W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css4-background] background-position-x and background-position-y or logical directions

From: Florian Rivoal <florianr@opera.com>
Date: Fri, 22 Jun 2012 11:02:33 +0200
To: www-style@w3.org
Message-ID: <op.wgarejcj4p7avi@localhost.localdomain>
On Thu, 21 Jun 2012 19:49:19 +0200, Brad Kemper <brad.kemper@gmail.com>  

>> If introducing -x and -y didn't prevent us from doing another useful
>> thing (logical keywords), then yes, we introducing them would be best,
>> which is why I was considering writing a spec for it. But we can't have
>> both, and that troubles me.
> Why not leave background-position-x and background-position-y physical,  
> but let the values they accept depend on writing mode? Thus, if writing  
> mode is vertical, then background-position-x can be head or foot, and if  
> writing mode is horizontal, then background-position-x can be start or  
> stop.

When you want to determine if background-position-x can accept head, or  
you want to see if background-position:head should send its value to
background-position-x or background-position-y, you're still only
at the parsing stage.

To know the writing mode on an element, you need to have finished
the parsing stage, and applied the cascade and looked up the computed
value of the direction property on the relevant element.

This happens strictly after the parsing stage, to late to be used to
influence the parsing of other properties.

  - Florian
Received on Friday, 22 June 2012 09:03:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:00 UTC