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

On Sat, Apr 19, 2014 at 2:24 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Apr 18, 2014, at 3:31 PM, Tab Atkins Jr. wrote:
>> Yes, the use-case is when, for whatever reason (watermarking?) you
>> want the image to show up at the top of the element, but also at the
>> "start" of the text, whichever that is.  So you'd do
>> "background-position: top start;".
>
> That still isn't a "whatever axis is vertical" situation. That's just bi-di if the vertical is also the block direction, since 'top' (being a vertical value) means the 'start' must refer to the horizontal, not necessarily the inline direction. Your example was:
>
>> Where "start" means "in the start direction of whatever axis is vertical".
>
>
> So, sometimes start could be vertical, and sometimes horizontal. But as near as I can tell, you would never not care which axis 'start' was assigned to.

I think you're misunderstanding me, because this is the opposite of
what I said.  It's the start direction in the vertical axis - by
"whatever axis is vertical" I meant "whatever logical axis is vertical
- block or inline".  It's relying on the convenient fact (cited as a
pro when we finally made the decision on logical-axis names) that we
can say "start" as a shorthand for "block-start and/or inline-start"
in cases where the axis is irrelevant or unambiguous.

> On the other hand, maybe that's not a problem. Even though an author would never need to write 'bg-pos: left start' (aside from dealing with bi-di vertical text, I guess, if such a thing exists), perhaps there is no harm in letting it decompose into 'bg-pos-x: left; bg-pos-y: start;'.

No, there's at least some reason to do it, and it's nothing to do with
bidi vertical text.  (Such a thing does exist, btw.)

> Except, that would also mean 'bg-pos-inline: left; bg-pos-block: start;' then. Does that mean in vertical text that 'bg-pos-inline: left', and therefore 'bg-pos-x: left;' is invalid?

No, the *-inline/block properties would only take logical keywords.
The physical keywords don't have that convenient axis-agnostic form,
and anyway, you only *need* one of the two property pairs to support
mixtures.  (That is, since the physical properties allow mixing
physical and logical keywords, we don't need to allow the logical
properties to do the same, as it doesn't add anything.)

> Or are 'bg-pos-inline' and 'bg-pos-y' not quite aliases of each other? Do you maintain them as separate properties, so that 'bg-pos-inline: left' is invalid but 'bg-pos-x: left;' is still valid?

The physical and logical properties are aliases of each other, but
*which* ones alias what is dependent on 'direction' and
'writing-mode'.  In practice, this means that you first run cascade
for the wm-determining properties, then run cascade for everything
else.  (We already do something equivalent to this in WK/Blink.  FF
does something different, but which has identical effects I think.)

> Is this described anywhere?

In this thread right now, because we're proposing this behavior.

~TJ

Received on Sunday, 20 April 2014 02:07:59 UTC