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

2009/4/27 Alexis Deveria <adeveria@gmail.com>:
> Some issues that came up when working on my JavaScript implementation:
>
> 1. It wasn't clear to me what the height should be of a white space
> row (i.e. " . . . ") when no height has been given to either the row
> itself or the template. I believe my implementation currently sets the
> height to 0, though Example IX seems to make it about 1em, or perhaps
> it uses the height of the previous slot. Either way, the correct
> behavior should probably be mentioned under [1] "Computing the height
> of the slots"
>
> [1] http://www.w3.org/TR/2009/WD-css3-layout-20090402/#rowheight

Really, you cannot have no height set for rows, nothing implies *,
which means that space is distributed.

> 2. I feel like the spec is missing some examples on how templates deal
> with slot elements with given widths/heights. As I understand it these
> values are ignored, except when max-content, min-content, minmax(p,q),
> or fit-content are used.

Do you mean ::slot pseudo-elements? Width / height don't apply to them.
For elements flowed into slots, instead, width / height are considered
as usual (this means that they could overflow)

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

Also borders and paddings don't apply. There have been a proposal for
those, IIRC it implied box-sizing:border-box (thus creating a
separated border model without border-spacing)

> 4. I assume that when widths/heights in the template are defined in
> "em" values, the base font is that of the template element, right? In
> which case an row with a height set of 1em that included an element
> with a larger font size would actually have part of it clipped off.

Em values outside "font-size" are relative to the computed value of
"font-size" in that element. So yes, "em" in template definitions is
relative to the font chosen for the template element.
Also remember that ::slot inherit from the template element, while
elements flowed into the slot inherit from their normal position in
the DOM.

>
> That's all I could come up with for now, but I may mention more in the future.
>
> Thanks,
>
> Alexis
>
>

Giovanni

Received on Monday, 27 April 2009 16:53:45 UTC