Re: [css-logical-props] resolving against parent's writing mode properties

On 01/28/2015 07:09 PM, Cameron McCormack wrote:
> I don’t understand the reasoning behind resolving the margin-* and
> padding-* logical properties against the writing mode properties of the
> parent, rather than the element itself.  Can someone explain, and
> perhaps add that explanation to the spec as a note?

I think Rossen and I were discussing this during a coffee break last year
and concluded to leave them to resolve against the element itself, for
simplicity. I'd start with that as the implementation and think about if
it should be something different.

Ideally, I think you'd want to compute margins and borders against the
containing block, since an English article and a Japanese article in
the exact same location in a layout should have the same margins and
borders; whether you have top/bottom borders or right/left borders
(if you picked only a pair) would usually depend on the context, not
the contents. Certainly the abspos offsets would depend on the context,
not the contents, of the abspos element.

But I'm not sure what's ideal for padding, and containing block relations
are maybe not so clear when you're in the middle of cascading, and it's
probably easier for people to remember to just only check the element's
own properties. It will mean that many use cases will involve wrapper
elements, though.

> Also, the spec should define what happens when you use one of these
> logical properties on the root element.

The root element propagates direction/writing-mode to the initial
containing block.

~fantasai

Received on Friday, 30 January 2015 21:35:56 UTC