- From: John Daggett <jdaggett@mozilla.com>
- Date: Thu, 21 Oct 2010 21:04:48 -0700 (PDT)
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: www-style@w3.org
L. David Baron wrote: > I wanted to raise a third option for how to deal with logical > properties in addition to the two I cited in > http://lists.w3.org/Archives/Public/www-style/2010Jun/0003.html . I think the problem with logical properties is not so much one of implementation difficulty but that it creates a confusing authoring model that doesn't completely solve problems related to supporting both vertical and horizontal layout. Some elements within vertical layouts will have the *same* orientation in both vertical and horizontal layouts (e.g. images, captions, form elements). Unless *all* directionally dependent properties in CSS 2.1 *and* in various CSS3 modules include directional equivalents (e.g. border-radius), authors need some way of defining styles that are dependent on the writing mode of a given element. Authors will also need this to optimize layouts that support both future browsers with vertical text support and older browsers without. With only logical properties supported authors would need to use some form of browser / CSS capability sniffing to do this. Once you have some mechanism for doing this, logical properties are no longer a necessity, they become syntactic sugar that simplify the writing to stylesheets to support both horizontal and vertical layout. With logical properties you still need two rules to handle fallback horizontal layout in older browsers: p { margin-left: 2em; /* horizontal layout in older browsers */ margin-start: 2em; /* vertical or horizontal layout in newer browsers */ } Existing basic box model properties (margin/padding/border) are relatively easy for authors to understand, they know what happens when they use them in stylesheets, they know what happens when they change them via Javascript. But if you add logical properties on top of these, the authoring model gets much more complicated for authors wanting to design layouts with vertical text. Authors now have to consider the interaction between two properties and changes via Javascript will have implementation-dependent behavior [1]. Plus both physical and logical properties still need to be defined to handle horizontal layout in older browsers. Regards, John Daggett [1] http://lists.w3.org/Archives/Public/www-style/2010Oct/0512.html
Received on Friday, 22 October 2010 04:05:22 UTC