- From: Håkon Wium Lie <howcome@opera.com>
- Date: Mon, 7 Jun 2010 09:51:58 +0200
- To: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Cc: John Daggett <jdaggett@mozilla.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>, Hakon Wium Lie <howcome@opera.com>
Also sprach MURAKAMI Shinyu: > > Murakami-san, other than the fact that creating new properties > > provides a way of specifying style rules that only apply to user > > agents that support vertical text, what are the advantages of > > supporting logical properties? I'm still unclear what the advantages > > are to this proposal beyond the fallback handling. > The fallback handling is very important. We want to access to the > documents (web or ebooks) styled as vertical writing even when we > cannot use UAs that support vertical writing. Fallback can be handled by other proposals, too. E.g. [1] [1] http://lists.w3.org/Archives/Public/www-style/2010Jun/0190.html > UAs that supprt vertical writing must suport logical properties. > The advantages of logical properties for such UAs are obvious. > They can switch writing modes (horizontal/vertical) by user preference. > It's easy to write stylesheets suited for both writing modes > using only logical properties. The same can be said for [1]. > UAs that support only horizontal writing need not (but should) > support logical properties. > Horizontal writing only UAs without logical properties > ignore styles using logical properties and the results will be > poor but can be read with default HTML styles. The same can be said for [1]. > The advantages of supporting logical properties for horizontal > writing only UAs are: > - good results with stylesheets using logical properties > - good for RTL (margin-start/end) > > To decrease implementation costs for such UAs (i.e., the block-flow > is always tb), the *-before and the *-after can be simply aliases of > *-top and *-bottom. I agree that it is possible to have an alising mechanism that doesn't require double sets of values to be computed and stored. This is not limited to UAs that only support horizonatal writing; I believe all UAs can implement direction-dependent aliases this way. However, this approach has two disadvantages. First, the computed of 'writing-mode' must be known before the cascading process can be finished. That is, you do not know what 'margin-start' is an alias for (margin-left? margin-top? margin-right?) until you know the computed value of 'writing-mode' and therefore do not know which declarations (say) 'margin-start: 10px' will compete with in the cascading process. Second, simply mirroring values does not allow you to twek values to provide the best layout. John Daggett wrote: > Ex: > body { margin-start: 3%; } /* works for either LTR or RTL text */ > > Doesn't this assume that the stylization is naturally symmetric? In > other words, that the layout of English text has a certain aesthetic > balance that is *precisely* mirrored when laying out Arabic for > example? I don't have a deep knowledge of Arabic but I'm somewhat > skeptical, the cursive nature of Arabic seems to suggest that the > balance of lines of text with margins is going to need to be tweaked > for the Arabic case. In which case, this syntactic sugar buys the > author very little. > > I see a similar problem with the vertical layout of Japanese text, I > don't think vertical text is typically laid out symmetrically to the > way horizontal text is laid out. A top margin for horizontal layout > is not necessarily going to be the correct right margin for vertical > layout. The approach that uses selectors (either pseudo-classes or media queries) do not have these problems; we don't need to change the cascading rules, and you can attach other styling (say, fonts or tweaking of margins) to writing direction. Cheers, -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Monday, 7 June 2010 07:52:52 UTC