RE: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

Thank you for your reply, fantasai.

I had a couple of misunderstanding. First, it looks like I misread the draft in opposite. Second, I was assuming IE's draft implementation in opposite. I mean, in both, "top" means "right" in vertical system. Sorry about these confusions.

> Having "margin-left" correspond to "the top margin" of a page makes no sense.

Does it? I think both makes sense depends on what you're looking at. If you think about page, I agree with you. But if you think about text flow, I think it can be opposite.

Let me take an example. Set "text-align:left" to <p>. In tb-rl, you'll get the paragraph aligned to top. Insert an image with "float:right". It should show up at bottom. And then you want to set a margin between the text and the image. Should that be "margin-top" or "margin-left"? Isn't "margin-left" more consistent with other properties in this case?

Another example would be settings a padding to the beginning of the paragraph. "text-align:left" and "padding-top", or "text-align:left" and "padding-left"?

Several properties are rotated in tb-rl anyway. I was thinking all properties are rotated in current draft, but thank you for pointing me out that I was wrong. Given the misunderstanding was resolved, I'm in the middle of which is right.

But do you agree that both could be the right answer depends on what you look at? Am I still missing something more important?


Koji


-----Original Message-----
From: fantasai [mailto:fantasai.lists@inkedblade.net] 
Sent: Friday, June 11, 2010 8:38 AM
To: Ishii Koji
Cc: John Daggett; MURATA Makoto (FAMILY Given); www-style@w3.org
Subject: Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

On 06/10/2010 02:55 PM, Ishii Koji wrote:
> I'm new to this ML, so please forgive me if I miss something already discussed.
>
> I tried to follow this thread as much as possible, but I just don't 
> understand the need for these things. I also don't understand why 
> margin-top is for top even in vertical text flow. Could anyone point me where this is defined?

left, right, top, and bottom are absolute directions in English. Having "margin-left" correspond to "the top margin" of a page makes no sense.

> I could find some reference for block-flow property at:
> http://dev.w3.org/csswg/css3-text-layout/#details

> and this mentions that:
> LR layout '*-left' is analogous to TB's '*-top'

The layout *rules* are analogous: for example, left and right margins in vertical mode are calculated the way top and bottom margins are calculated in horizontal mode. However this does not mean the entire system gets turned on its side.

(I take your comment to mean that the draft should be more clear on this point.)

> This behavior matches to what I expect. But it sounds like we're doing 
> opposite for writing-mode if I understand correctly.
>
> I would vote the writing-mode should be consistent with the block-flow property.
> Could someone please tell me what I'm missing?

'writing-mode' is a shorthand that also sets the 'block-flow' property.
The behavior when either triggers a vertical writing mode is therefore the same.

'writing-mode' also happens to set 'direction', according to the draft, which is a horrible, horrible way to do things from an i18n perspective because it overrides the HTML [dir] attribute (and this is almost never the author's intent). :(

~fantasai

Received on Friday, 11 June 2010 04:51:13 UTC