- From: Håkon Wium Lie <howcome@opera.com>
- Date: Tue, 8 Jun 2010 09:16:02 +0200
- To: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Cc: Hakon Wium Lie <howcome@opera.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, John Daggett <jdaggett@mozilla.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
Also sprach MURAKAMI Shinyu: > > Let's try to get an overview of the various proposals. > > 1) direction-dependent aliases: introduce aliases for properties with > > 2) duplicate sets of properties: two parallel sets of properties > > 3) pseudo-classes: introduce pseudo-classes to select elements based on @dir > > 4) media queries: like 3), except that media queries are used instead > > 5) alternate style sheets: put the rules for the various writing modes > The 3), 4) or 5) cannot solve all cases: > - cannot use in inline style attributes, e.g. style="margin-left: 2em" That's correct, you wouldn't be able to mirror a value set in the style attribute. Unless we add selectors to the style attribute. > - cannot write basic default stylesheet. > for example, in CSS2.1 Appendix D. Default style sheet for HTML 4: > > h1 { font-size: 2em; margin: .67em 0 } > h2 { font-size: 1.5em; margin: .75em 0 } > h3 { font-size: 1.17em; margin: .83em 0 } > h4, p, blockquote, ul, fieldset, form, ol, dl, dir, > menu { margin: 1.12em 0 } > blockquote { margin-left: 40px; margin-right: 40px } > ol, ul, dir, > menu, dd { margin-left: 40px } You can use 3) and 4) to write a default style sheet. E.g.: h1:lrt, h1:rtl { font-size: 2em; margin: .67em 0 } h1:ttb { font-size: 2em; margin: 0 .67em } For 5), you would need several files. > This only works when writing-mode is lr-tb. If MQ can be used as: > @media (dir: ltr) { > ... > } > @media (dir: rtl) { > ... > } > @media (dir: ttb) { > ... > } > > it doesn't work when both horizontal and vertical writing modes are > used in same page. Not if we use these defintions: dir:lrt horizontal writing is supported and @dir has been set to 'lrt' dir:rtl horizontal writing is supported and @dir has been set to 'rtl' dir:ttb vertial writing is supported and the initial value of 'writing-mode' is 'tb-rl' Then you could do: @media (dir: ttb) { ... table { writing-mode: lr-tb; ... } } That is, you can have horizontal content even if the intial value of 'writing-mode' is 'tb-rl'. > MS IE supports many writing modes (total 8 writing modes, see: > http://blogs.msdn.com/b/ie/archive/2009/05/29/the-css-corner-writing-mode.aspx ) > and seems to have good default style sheet, works in all > writing modes, > > I suspect that IE has logical properties internally and > its default style sheet is written with that. > > It shows that the capability of CSS is very limited without > logical properties. That doesn't follow. If fact, proposal 3), 4) and 5) have greater expressive power than 1) or 2) as they don't simply mirror values on a limited set of properties, but can set arbitrary values on all properties. > I don't believe the logical properties will be widely implemented > in short-term (possibly only implemented as epub book readers for > Japanese and Chinese contents), but I believe the CSS standards > must be defined for the future. Indeed. > Håkon said in Tokyo last month, I was very impressed: > How long will the web last? -- 500 years! Right -- anyone want to bet against? :) > It means the invention of the web, inlcuding HTML and CSS, > can compare with the Gutenberg's invention 500 years ago. > > I think the cost for implementations will not be big problem > in such future. Memory and battery will still be constraints in our lifetime. I believe that the emerging e-book manufacturers in Asia agree with me. More importantly, perhaps, is the greater expressive power that 3), 4) and 5) has. Which is why you want one of them, I presume: > I want 1) or 2), plus 3), 4) or 5), as I wrote: > http://lists.w3.org/Archives/Public/www-style/2010Jun/0162.html Personally, I think adding two mechanisms is too much. Cheers, -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Tuesday, 8 June 2010 07:17:01 UTC