Re: [csswg-drafts] [css-logical] Should the mapping for logical values depend on the element or containing block?

Oh, sorry, thought this was about the logical properties. Those compute against the element's own writing mode always, for simplicity and because it wasn't entirely clear where to draw the boundary between “this is best computed against the CB writing mode” and “this is best computed against the element's own writing mode”: at the border edge? the padding edge? the content edge?

For logical values, it does depend on the property whether the containing block or the element itself is referenced. For example, the `start` and `end` keywords on `align-self` (which aligns the element in its containing block) use the containing block, so that when you set alignment on a bunch of items they are consistently aligned regardless of writing mode. The `self-start` and `self-end` values allow to reference the element itself. However, `text-align` and `align-content`, which align an element’s content within itself, reference the element's own writing mode, since the containing block's writing mode would be irrelevant.

Floats are more similar to `align-self` and `justify-self`, so I think they should compute against the CB. Typically you don't want the float to float differently based on its own contents, but rather on the  writing mode of its context.

@emilio Logical values don't compute through to physical ones, so the style system doesn't need to know about it.

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3013#issuecomment-413998727 using your GitHub account

Received on Friday, 17 August 2018 22:00:08 UTC