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

On Apr 18, 2014, at 3:31 PM, Tab Atkins Jr. wrote:

> On Fri, Apr 18, 2014 at 1:59 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> My initial reaction was to agree with you, but then I started thinking about why someone would use 'start' instead of 'top' or 'left'. It would be to align with the text in some significant way.
>> 
>> So, suppose I wanted a radial gradient dot to appear at the start of the block direction (which would be the top of the text block in Latin-based languages), and centered in the inline direction, with enough 'padding-block-start' to make it visible before the first line of text. In that case, "whatever axis is vertical" doesn't help me. I would need a 'bg-pos-block' and 'bg-pos-inline'.
> 
> Yes, we're also adding those.

OK. 

> 
>> Do you have a different use case in mind, where 'start' would need to be used instead of 'top' or 'right', but the axis you applied it to would always be vertical? Or alternately horizontal, if you used 'bg-pos-x'? It seems to me that if you didn't care which logical dimension it was aligned to as long as it was the start of the vertical, you would just use 'top' instead of 'start'.
> 
> 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.

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;'. 

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? 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? Is this described anywhere?

 

Received on Saturday, 19 April 2014 21:25:21 UTC