Re: [css-shapes] Animating <basic-shape>s updated

On 1/21/14, 3:34 PM, "Alan Stearns" <stearns@adobe.com> wrote:

>So I believe the steps below are the correct ones to use when serializing
>a <position> computed value, including when it’s in the middle of a
>transition.
>...
>I’ve updated the Shapes version to account
>for some of the steps below. It now reads:
>
>----
>To serialize the <basic-shape> functions,
> serialize as per their individual grammars,
> in the order the grammars are written in,
> avoiding calc() expressions where possible,   (new)
> using keywords where possible,                (new)
> omitting components when possible without changing the meaning,
> joining space-separated tokens with a single space,
> and following each serialized comma with a single space.
>----

After talking to Fantasai and David about these rules, I believe we agreed
on one general change to the above and one change specific for <position>.

The first keys on whether we should prefer keywords over lengths. I don’t
have a big preference either way, but think that it might be slightly more
convenient to prefer a ‘0%’ result instead of ‘left’ if you’re looking to
manipulate the value.

The second comes from a preference to make <position> serialization
consistent over its various uses. The background-position property never
had its serialization defined, so there isn’t an entirely consistent model
to follow. In a quick survey it appears that background-position
serialization prefers a 2-value form over a 1-value form, and browsers are
split on whether to use keywords or lengths. WebKit/Blink/Presto use
lengths instead of keywords, and IE/FF use keywords instead of lengths.

So I propose removing the “using keywords where possible” from the section
in the Shapes draft, and adding a special case for <position>:

----
To serialize the <basic-shape> functions,
serialize as per their individual grammars,
in the order the grammars are written in,
avoiding calc() expressions where possible,
omitting components when possible without changing the meaning,
joining space-separated tokens with a single space,
and following each serialized comma with a single space.

For the <position> values in ellipse() and circle(),
the 2- and 4-value forms are preferred over the 1- and 3-value forms.
----

Thanks,

Alan

Received on Tuesday, 28 January 2014 22:22:07 UTC