- From: Giovanni Campagna <scampa.giovanni@gmail.com>
- Date: Tue, 28 Apr 2009 15:14:05 +0200
- To: Bert Bos <bert@w3.org>
- Cc: www-style@w3.org
2009/4/28 Bert Bos <bert@w3.org>: >[...] > >> >> 3. Some examples have suggested that template slots deal with borders >> and padding the same way table cells do, but this may not be quite >> clear enough. So I would recommend adding at least one more example >> with expected rendering of a template with various combinations of >> paddings, borders, margins applied to slot elements. > > The main purpose of the template was to position elements, not to add any > new decorations. Some people asked for backgrounds on slots. They were easy > to specify and don't influence the layout, so they were added. But borders > are much harder. The borders in the draft are only set on elements, not on > slots. Unless there is a convincing case for adding more borders than there > are elements, I prefer to keep the templates as simple as possible... Actually, you need borders as soon as you put more elements inside the slot, and you want a border/padding covering the whole slot without using additional elements. You can fake it setting border-top on the first element, border-bottom on the last and left / right on elements in the middle, but I'm not sure that is the way to go (you most of time need additional classes / IDs for those elements). This also applies if you have a template row/column greater than the element inside the slot, and you want to align borders between slots. Summing up, I think that the following properties should be allowed for ::slot: padding, border (including border-image), position (only relative) and top/left/right/bottom/z-index, page break related properties (to avoid breaking rows/columns). Also I would like to see allowed by Selectors Level 4 the combinations ::slot(a)::before and ::slot(a)::after, to insert text inside slots, without inserting it into elements (that may have border / padding) > > > Bert > -- > Bert Bos ( W 3 C ) http://www.w3.org/ > http://www.w3.org/people/bos W3C/ERCIM > bert@w3.org 2004 Rt des Lucioles / BP 93 > +33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France > > Giovanni
Received on Tuesday, 28 April 2009 13:14:50 UTC