Re: [css3-background] Overly-clever background-position grammar

On Tue, Dec 20, 2011 at 6:06 AM, Christoph Päper
<christoph.paeper@crissov.de> wrote:
>>> <bg-position>  = [
>>>   [ top | bottom ]
>>> |
>>>   [ <percentage> | <length> | left | center | right ]
>>>   [ <percentage> | <length> | top | center | bottom ]?
>>> |
>>>   [ center | [ left | right ] [ <percentage> | <length> ]? ] &&
>>>   [ center | [ top | bottom ] [ <percentage> | <length> ]? ]
>>> ]
>
> This allows “left top”,   “left bottom”,   “left center”,
>           “right top”,  “right bottom”,  “right center”,
>          “center top”, “center bottom”, “center center”,
> but forbids “top left”, “bottom left”,   “center left”,
>           “top right”, “bottom right”,  “center right”,
>          “top center”, “bottom center”.
> Is this intended?

No it doesn't - all of the ones in your latter list are possible by
following the third clause.  Like I said, the current grammar is
*confusing*.  ^_^


> PS: Why again is the vertical center not called ‘middle’?

At this point, historical inertia.  That definitely would have helped
in some ways, as it would have allowed things like "center 20%" to be
unambiguous.

~TJ

Received on Tuesday, 20 December 2011 15:42:04 UTC