- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 17 Apr 2014 18:17:27 -0700
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: "www-style@w3.org" <www-style@w3.org>, MURAKAMI Shinyu <murakami@antenna.co.jp>
On Thu, Apr 17, 2014 at 5:50 PM, fantasai <fantasai.lists@inkedblade.net> wrote: > On 04/16/2014 05:41 PM, Dael Jackson wrote:> >> >> Add -x/-y longhands to background-* properties >> ---------------------------------------------- >> >> - RESOLVED: background-position-x/-y, background-repeat-x/-y >> approved for level 4 of backgrounds and borders. > > > Okay, so this is problematic and here's why: > > Let's say we have background-position-x/-y. > We also need logical equivalents, background-position-inline/-block. > > So far so good. Similar to margin, which expands out to > margin-left/right/top/bottom > and > margin-block-start/block-end/inline-start/inline-end > > Now, what's the initial value of these properties? > With margin it's 0. No problem. Everybody is zero, we get > zero margins. No conflicts. > margin-left: 0; > margin-right: 0; > margin-top: 0; > margin-bottom: 0; > is exactly equivalent to > margin-inline-start: 0; > margin-inline-end: 0; > margin-block-start: 0; > margin-block-end: 0; > no matter the writing mode. If you tweak any values, the > cascade then says which wins. > > But with background-position, the initial values are > background-position-x: left /* defined by CSS1 */; > background-position-y: top /* defined by CSS1 */; > There is no way to express an equivalent in logical terms: > background-position-inline: start; > background-position-block: start; > is only equivalent when writing-mode is LTR-TB. Initial values > don't have a cascading order, so when the writing mode is not > LTR-TB, what wins? > > I'd like to have background-position-x/y, but we're missing a > solution to make it actually work. I think we can resolve this by fiat. When there's no cascade information dictating which property should win, we declare that the physical ones should win. This only has an effect when there are no rules setting the property at all, in the author or UA sheets, and so it's purely a matter of maintaining web compat. ~TJ
Received on Friday, 18 April 2014 01:18:16 UTC