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: Thu, 21 Oct 2010 15:00:45 -0500
Cc: www-style@w3.org
Message-id: <B777D8BD-A855-443F-9D20-1098D2B6138D@apple.com>
To: "L. David Baron" <dbaron@dbaron.org>
On Oct 21, 2010, at 2:35 PM, 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 .
> 
> The proposal now in
> http://dev.w3.org/csswg/css3-writing-modes/#logical-prop requires
> strict adherence to CSS cascading rules.  An implementation can do
> this using the approach described in
> http://lists.w3.org/Archives/Public/www-style/2002Sep/0049.html .
> 
> However, if we allow implementation-defined deviation from the CSS
> cascading rules when determining the relative priority of
> declarations of a logical and physical property **in the same
> ruleset**, then I think the required implementation complexity is
> significantly reduced.  (If we did this, I would suggest making use
> of such property pairs within the same ruleset an authoring
> conformance error.)
> 
> In particular, with this approach, implementations would no longer
> need the extra pseudo-properties to track the relative priority of
> declarations within the same declaration, and they could do the
> relevant computations at cascade time after determining the
> direction.
> 
> (Getting this reduction in complexity might somewhat limit
> implementation approaches, since it requires computing 'direction'
> before cascading any properties with logical/physical pairs.  I
> think that's not a problem in Gecko, so this approach would simplify
> our implementation of logical properties significantly.  I'd be
> interested to hear if it would help in other implementations.)

Can you explain this further?  I don't really understand what you're suggesting.  Examples would help.

In WebKit, which implements all of the logical properties, we just resolve direction and writing-mode first (similar to what implementations have to do for font), and then we map the logical property to a physical property.  This is all very simple and takes very little code.  Is there some problem with this approach that I'm missing?

dave
(hyatt@apple.com)
Received on Thursday, 21 October 2010 20:01:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:33 GMT