Re: [CSSWG] Minutes and Resolutions 2010-02-17

On Feb 18, 2010, at 6:00 AM, fantasai wrote:

>  - Discussed Yves' comment about background shorthand syntax for background-size
>      http://lists.w3.org/Archives/Public/www-style/2010Jan/0248.html
>    fantasai to write up proposal for using 'as' instead of '/' to indicate the
>    background-size (as opposed to background position) in the shorthand.

I'm sorry I wasn't able to attend the telecon last week, but this does not seem like an improvement to me. The slash is an effective separator for dividing the values into chunks. Once you learn the simple rule of what the chunks are (what can appear to the left of the slash and what can appear to the right of it), then it is easy to recognize what the value represents based on which slash-separated chunk it is in. A keyword is less effective in this regard, and it is just another word in a series of words and measurements, and less instantly recognizable as a separator.

The word itself, "as", doesn't really say much to me either. Why "as"? If it is just supposed to be a prefix for the background-size value, then it seems like "size" would be better. But then naming each value part is a long road to go down, and I don't think we should start. The slash seems so much better to me.

>  Bert: It separates size from position.  Behind slash, it's a size,
>        not behind, it's a position.
> [...]

> sylvaing: I don't like having the separator, and being able to skip
>            what comes before it.  If the slash is there, it should
>            have something on both sides.
> [...]

>  szilles: Is there an example elsewhere of a slash without something
>           before it?

I think that an example of something that is pretty close is the border-image shorthand. It has 2 possible slashes in it to separate the values into 3 chunks, but you are not required to having anything in the middle chunk. You can just have the two slashes next to each other, with the border-image-width values absent. So, to my mind, 'border-image-width' is the missing "something before it" [other than another slash separator] example. 

Once you know that the slash(es) in the shorthand are to separate similar-looking values (for disambiguation),  then you learn what goes where, and it becomes very clear what the values represent, based on their position in relation to the slashes. This to me is much, much more clear and quick to read and understand than a keyword prefix like "as".

Received on Tuesday, 23 February 2010 08:21:15 UTC