Re: [css3-layout] Issues/suggestions for Template Layout Module

On Tue, Apr 28, 2009 at 8:14 AM, Giovanni Campagna
<scampa.giovanni@gmail.com> wrote:
> 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.

Giovanni got it in one.  Both of those are exactly my reasons for
wanting borders on slots (and padding).  The draft essentially creates
a phantom container element, and I want to be able to *style* that
container!

> 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).

Can you expand on that last one?  I understand the rest, but can't
quite get what you'd use the page-break properties for.

> 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)

Wouldn't work - ::before and ::after are siblings to their superior
parent.  You'd need ::inside first (and have it applicable to ::slot).

~TJ

Received on Tuesday, 28 April 2009 14:46:02 UTC