W3C home > Mailing lists > Public > www-style@w3.org > June 2010

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

From: Ishii Koji <kojiishi@gluesoft.co.jp>
Date: Sun, 13 Jun 2010 22:24:30 -0400
To: fantasai <fantasai.lists@inkedblade.net>
CC: John Daggett <jdaggett@mozilla.com>, "MURATA Makoto (FAMILY Given)" <eb2m-mrt@asahi-net.or.jp>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E09E910C461@MAILR001.mail.lan>
I'm not trying to convince you to change your mind. I just want to clearly understand the current situation. I also wish you to understand what issues we have right now, how Asian cultures differ from yours, and hopefully wish you to come up with a good solution everyone can live together.

You know, I heard there's a culture in the world where nodding means "no" rather than "yes". We can't force them to change their culture. They can't change ours. There's no single answer which is right. Both parties should just agree upon there's a cultural difference here, and then we can communicate to each other, right?

I think the issue is what the directional terms are against, because "left against flow" is grammatically correct English. I'm glad that you think text-align and float are against flows and we share the culture here. It looks like the cultural difference is only about margins.

Allow me to write some historical background of Asian typography. Asian has been using the vertical writing system for more than a thousand years, and there are many terminologies that assumes it. For example, we use a word meaning "head" to indicate the beginning of a line, because "head" is "top" of the body. "Bullets" is translated to "bullets at the head of lines". "Left indent" is translated to "head indent". "Left aligned" to "head aligned". And so forth.

I'm not very familiar with the history, but probably a few hundred years ago, Asian started using the horizontal writing system in parallel with the traditional vertical writing system. When we started using it, we didn't change the terminologies. We still use the word "head" meaning the left edge of a line, which could have been considered inconsistent for some people, but Asian culture has accepted "head" means "left" in the horizontal writing system. I think this example describes well how Asian culture used to think directional terms against flows.

As I understand, Latin languages have not changed writing directions in the past. And because the history was so different that having different cultures makes perfect sense.

I was thinking how "switch to vertical writing" feature can be implemented in Asian browsers/editors. Given the current definition of margin/padding, browsers/editors must scan whole document and adjust every margin and padding to match to the Asian culture. I think browsers/editors need to implement the following rules.

1. If the source document is before CSS3, we need to swap margins and paddings.
2. If the source document is after CSS3, we have a problem here. Examples include CSS3 documents originally written for horizontal writing system where author's intention is ambiguous. If the author is an Asian, it'd probably mean "against flow". If otherwise, it'd mean "against page", because of the cultural difference.

There are heuristic rules, and probably it's very hard to implement the rules correctly. If I were the spec owner, since the feature is for Asians only, I would assume authors are Asians, and I would write a spec to swap them all the time. It may violate CSS spec, and in the case it can cause troubles with anybody else in the world, I might have a switch in the option dialog and change its default value depending on the user's culture.

But I also think this is not a very good attitude for a global standard. A global standard exists so that multiple different cultures can co-exist, right? We can use our own currency signs because a global standard allows us to do so. I believe, rather than ignoring and doing differently from a global standard, we should speak that there's a cultural difference here, and find a good solution for it together. And thus here I'm doing so.

Did I make my problem clear enough? Do we share the understanding?

And most important for me, since it looks like you know everything in the current situation of CSS, do you have any recommendations how we could resolve this issue in a smart way? I hope you'd hate the situation where a global standard requires all Asians to adjust margins and paddings to match to their culture, wouldn't you? The "smart way" I think would help Asian people to use "switch to vertical" feature without scanning the document, but also doesn't leave non-Asian people strange feelings.

Will you please help us?


-----Original Message-----
From: fantasai [mailto:fantasai.lists@inkedblade.net] 
Sent: Saturday, June 12, 2010 4:03 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 09:50 PM, Ishii Koji wrote:
> 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?

This is why in CSS3 'float' and 'text-align' will have 'start' and 'end' as values, which will map to top/left/bottom/right depending on the writing mode.

We do need to specify what 'text-align: left' means in vertical mode, but the meaning I would choose there is "the side of the block that left-to-right text would start on"--which can change depending on the text-orientation and is not mapped only based on writing-mode. For 'float', if we allow floating to the top and bottom of the containing block in horizontal writing mode, then it would make sense for 'left' to retain its directional meaning.

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

I understand the need for properties that correspond, but I disagree that "margin-left" should correspond to a margin on the top side of a box. It is inconsistent with the English, and it is inconsistent with usage in XSL.

~fantasai
Received on Monday, 14 June 2010 02:25:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT