W3C home > Mailing lists > Public > www-style@w3.org > October 2010

Re: [css3-writing-modes] a third option for implementing logical properties

From: David Hyatt <hyatt@apple.com>
Date: Fri, 22 Oct 2010 12:36:08 -0500
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
Message-id: <3EBA7901-E7DD-4947-84C8-A6A69F6D1833@apple.com>
To: John Daggett <jdaggett@mozilla.com>
On Oct 21, 2010, at 11:04 PM, John Daggett wrote:

> 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.

It's an authoring model that you only have to opt into when you need to design a layout that can work in multiple directions.  This isn't exactly common.  "doesn't completely solve problems" is too vague for me to respond to.  If there are specific issues, let's talk about them.

> in both vertical and horizontal layouts (e.g. images, captions, form
> elements).

Form elements are not quite the same as images.  Form elements just do a writing-mode reset (similar to how they reset many other properties).  If you explicitly put writing-mode on a form control, there's no reason why it wouldn't respect the writing-mode (this works in IE today at least for some controls like buttons).

> 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.

This may in fact be necessary, but that doesn't mean you should force authors to duplicate many physical declarations in two different blocks.  There is still value in having a logical abstraction even if it doesn't cover 100%.  If it covers 90%, that's still going to make life much easier for authors.

> Once you have some mechanism for doing this, logical properties are no 
> longer a necessity, they become syntactic sugar that simplify the

Extremely valuable syntactic sugar.  Do you really want to add hundreds of additional lines to your UA sheet in Gecko?  I feel like if you started trying to implement vertical text in Gecko, you would quickly realize how badly you need these properties... and if you need them in the UA sheet for directional abstraction, don't you think an author trying to write directionally abstract content would need them also?

These properties are so valuable that they'd end up in WebKit anyway even if it's just an implementation detail to make writing the UA sheet easier.  That's how much they're needed.  I can't imagine how crazy the UA sheet would get to maintain if I had separate blocks for every directional possibility for every element.

>  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.  

No, it gets more complicated for authors wanting to design DUAL layouts.  Let's not confuse the two. 

> Authors now have to consider the
> interaction between two properties and changes via Javascript will have
> implementation-dependent behavior [1].  

As I said before, that's a CSS OM problem.  Don't attack logical properties because of flaws in the underspecified CSS object model.

Received on Friday, 22 October 2010 17:36:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:40 UTC