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

From: "MURAKAMI Shinyu" <>
Sent: Saturday, June 05, 2010 1:38 AM
To: "Hakon Wium Lie" <>
Cc: "Boris Zbarsky" <>; "www-style list" <>
Subject: Re: [css3-text-layout] New editor's draft - 
margin-before/after/start/end  etc.

> MURATA Makoto wrote:
> | Recent implementations of EPUB in Japan have started to abuse existing 
> margin, etc.
> | properties by making them relative to the writing direction chosen by 
> the user or viewer.
> This shows writing direction relative (logical) properties are useful 
> enough.
> I believe that basic common styles for multiple writing modes should be
> able to specify with one stylesheet using logical properties and when
> we want further results for each writing mode, we should use alternate
> stylesheets, or perhaps Media Queries querying UA features and/or
> user preferences.

Consider this pseudo-markup:

<view dir="ttb">

Where <view> represents UA's view. It's dir attribute will affect
all DOM elements in the view setting their :ttb and :ltr "environment 
This view is responsible for setting its dir value according to user's
preferences. Content may override default directionality of the view
by specifying dir=ltr or dir=ttb if needed.

Having all this in place authors that are aware of TTB/LTR representations 
their documents can start writing their styles as:

p:ltr { margin:20px 0; direction: ltr; }
p:ttb { margin:0 20px; direction: ttb; }

Exactly in the same way as if they *must* do with those logical
p { margin-logical:20px 0;  direction: ???;  }

So either one of these two cases are *not* zero-effort solution for authors.
Both cases will require *exactly* the same amount of attention from
web developers.  So neither of these variants will give them benefits
in this respect.  But both allow to specify what you need.

Now about technical side of all this. And social side too if you wish.

:ltr/:ttb solution will not make processing of you documents
slower in runtime. At all. But those virtual properties that you are
talking about require additional CPU cycles for handling of
each dimensional property in runtime.
Plus sizes of code and so UA distribution.
So *each Web user* will pay some price for feature that he/she
will never need in his/her life.  Just because some web developer
is not willing to write this:

p:ltr { margin:20px 0; direction: ltr; }
p:ttb { margin:0 20px; direction: ttb; }

instead of this:
p { margin-logical:20px 0;  direction: ???;  }

That is totally unfair solution if you would ask me.

And yet: even in pure LTR/TTB neutral HTML content could be
some strict LTR, TTB or even RTL islands that only author
of the particular content knows about.

E.g. consider this sample provided by John Daggett @ Mozilla/Japan

As you see there is a strict LTR island on top that contains fragment
that the author of the text defined to be LTR: <p dir="rtl">...</p>
If it is on author's level than author shall use the same approach
that HTML has for LTR/RTL mixes -use of @dir attribute:

Andrew Fedoniouk

Received on Saturday, 5 June 2010 20:49:02 UTC