W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: [css-background] Add the *-x/y longhands to appropriate properties?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 18 Apr 2014 09:15:29 -0700
Message-ID: <CAAWBYDDgebHJG-n6rYonb4mXXMeJH5Bc8T41wTvCa1=E=9G-vw@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style list <www-style@w3.org>
On Thu, Apr 17, 2014 at 5:10 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 04/09/2014 05:40 PM, Tab Atkins Jr. wrote:
>> Could we go ahead and add the *-x/y longhands to the appropriate
>> background-* properties?  I know that background-position-x/y are
>> already supported by several impls, and background-repeat-x/y are
>> supported by WK/Blink at least.
>> At minimum it's those two properties, though others could be expanded
>> out as well if necessary.
>> As far as I know, our current plans for handling logical-direction
>> background stuff are compatible with still adding physical-direction
>> longhands, since we'll likely do it by adding logical-direction
>> longhands too (background-position-inline/block, etc), plus some way
>> of deciding which set of positions to pay attention to.
> I remembered the problematic case for this one:
>   background-position: left start;
> This doesn't split nicely into -x/-y/-inline/-block properties
> that take only offsets.

I wouldn't want the longhands to be only offsets anyway.  It's still
convenient to say "background-position-x: right 10px;", rather than
having to write "calc(100% - 10px)" in the longhand.

So, we'll want to allow keywords.  At that point, your example works just fine:

bg-pos: left start;

would decompose to:

bg-pos-x: left;
bg-pos-y: start;

Where "start" means "in the start direction of whatever axis is vertical".

Received on Friday, 18 April 2014 16:16:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:41 UTC