- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Sat, 5 Jun 2010 13:21:48 -0700
- To: "MURAKAMI Shinyu" <murakami@antenna.co.jp>, "Hakon Wium Lie" <howcome@opera.com>
- Cc: "Boris Zbarsky" <bzbarsky@mit.edu>, "www-style list" <www-style@w3.org>
-------------------------------------------------- From: "MURAKAMI Shinyu" <murakami@antenna.co.jp> Sent: Saturday, June 05, 2010 1:38 AM To: "Hakon Wium Lie" <howcome@opera.com> Cc: "Boris Zbarsky" <bzbarsky@mit.edu>; "www-style list" <www-style@w3.org> Subject: Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc. > > MURATA Makoto wrote: > http://lists.w3.org/Archives/Public/www-style/2010Jun/0159.html > | 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"> <html>...</html> </view> Where <view> represents UA's view. It's dir attribute will affect all DOM elements in the view setting their :ttb and :ltr "environment states". 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 of 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 properties: 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 http://people.mozilla.org/~jdaggett/images/ex3-nikkei20100602-aft-p3-ipad-rental.png 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: http://www.w3.org/TR/i18n-html-tech-bidi/#ri20030728.09474480 -- Andrew Fedoniouk http://terrainformatica.com
Received on Saturday, 5 June 2010 20:49:02 UTC