Skip to content

Ambiguity in transition shorthand property as defined by grammar #12494

@keithamus

Description

@keithamus

I'm having a little trouble interpreting the spec. I can of course resolve this pragmatically, but I think there exists an ambiguity in the spec that I'm interested in teasing out to see if I am misinterpreting some fundemental aspect of parsing or if there is something more than can be done to shre up the spec...

The grammar for transition (and related grammars) are defined as:

<single-transition>*

<single-transition> = [ none | <single-transition-property> ] || <time> || <easing-function> || <time>

<single-transition-property> = all | <custom-ident> 

<easing-function> = <linear-easing-function> | <cubic-bezier-easing-function> | <step-easing-function>

<linear-easing-function> = linear | <linear()>

<cubic-bezier-easing-function> =   ease | ease-in | ease-out | ease-in-out | <cubic-bezier()>

<step-easing-function> = step-start | step-end | <steps()> 

....

The problem is that to parse in grammar order <single-transition-property> comes before the <easing-function> type, which would mean a property value like ease-in would first go to <single-transition-property> and then be swallowed by <custom-ident>.

<custom-ident> is defined as:

Some properties accept arbitrary author-defined identifiers as a component value. This generic data type is denoted by , and represents any valid CSS identifier that would not be misinterpreted as a pre-defined keyword in that property’s value definition. Such identifiers are fully case-sensitive (meaning they’re compared using the "identical to" operation), even in the ASCII range (e.g. example and EXAMPLE are two different, unrelated user-defined identifiers).

I think a resolution could be interpreted a few ways:

It would be great to get some clarity here.

/cc editors of css-transitions-1 @dbaron @grorg @birtles.
/cc @maraisr who discovered this issue with me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions