- From: Håkon Wium Lie <howcome@opera.com>
- Date: Sat, 5 Jun 2010 21:51:52 +0200
- To: Andrew Thompson <lordpixel@mac.com>
- Cc: www style <www-style@w3.org>
Also sprach Andrew Thompson: > The objection is :ltr/:rtl/:ttb would depend on the value of > writing-direction determined for a given element in the document > and similar proposals have been rejected before for good reasons. Yes. > Murata-san – I think – might be satisfied if there was a way to say > 'when the user's preference is set to vertical text, the following > rules apply'. > > So is it reasonable to separate :ltr and :rtl to be a shorthand for > inherited [dir] but to explicitly define :ttb as something entirely > different? I think so. I previously suggested: :lrt horizontal writing is supported and @dir has been set to 'lrt' :rtl horizontal writing is supported and @dir has been set to 'rtl' :ttb vertial writing is supported > A selector whose matching solely depends on whether the > user prefers this (part of?) the document to be vertical? > Quoting CSS 2 5.10: "CSS introduces the concepts of pseudo-elements > and pseudo-classes to permit formatting based on information that > lies outside the document tree." Good reading of the spec. I believe this falls within the scope of pseudo-classes. One option would be to tie this directly to a user preference. This would force UAs to offer a UI for setting the preferred writing mode. This would be a novel requirement; in the past, such UI preferences have been commmunicated to the CSS formatter by way of properties and values. However, if we accept that change, we could say: :lrt horizontal writing is supported and @dir has been set to 'lrt' :rtl horizontal writing is supported and @dir has been set to 'rtl' :ttb vertial writing is supported and the user has indicated that vertical writing is preferred. A variation of this would be to tie :ttb to the initial value of the 'writing-mode' property. We would then say: :lrt horizontal writing is supported and @dir has been set to 'lrt' :rtl horizontal writing is supported and @dir has been set to 'rtl' :ttb vertial writing is supported and the initial value of 'writing-mode' is 'tb-rl' The initial value of 'writing-mode' could then be a way for the UA to communicate the preferred writing-mode to the CSS formatter. UAs could offer a UI so that users would influence the initial value of 'writing-mode' and thereby the writing direction. (The shorthand 'writing-mode' doesn't have an initial value, but the individual 'block-flow' has. Therefore, it would probably be the initial value of 'block-flow' that should be used -- even if it feels less intuitive.) > Or for that matter, someone proposed a media query... certainly one > could argue a user preference for vertical layout is reasonably > within that definition. That would be a longer stretch, but not impossibly so. Code like this could work: @media (block-direction: rl) { ... } @media (preferred-writing-mode: vertical) { ... } @media (ttb) { ... } Cheers, -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Saturday, 5 June 2010 20:36:29 UTC