Skip to content

[css-values] Ambiguities with 0 valid for all dimensions #1162

Closed

Description

@ewilligers

animation example

With the recent decision that 0 is a valid value for all dimensions, the following changes meaning:

`animation: 1s 0;`

The 0 would previously have been interpreted as iteration count.

Now it is interpreted as animation-delay, so the iteration count remains 1.

https://drafts.csswg.org/css-animations/#animation

<single-animation> = <time> || <single-timing-function> || <time> || <single-animation-iteration-count> || ...
"Note that order is important within each animation definition: the first value in each <single-animation> that can be parsed as a <time> is assigned to the animation-duration, and the second value in each <single-animation> that can be parsed as a <time> is assigned to animation-delay."

offset example

With the recent decision that 0 is a valid value for all dimensions,

offset: ray(180deg) 0;

becomes ambiguous: 0 is a valid value for both offset-distance and offset-rotate.

offset-rotate is either 0 or auto.

https://drafts.fxtf.org/motion-1/#offset-shorthand

Value: ... <offset-path> [ <offset-distance> || <offset-rotate> ]? ...

Activity

  1. tabatkins commented on Apr 3, 2017

    @tabatkins
    Member

    We didn't decide 0 was valid for all dimensions (unless I'm remembering wrong) - just lengths and angles.

    That said, the 'offset' problem is definitely still valid.

    (I really, really hate that the group resolved this way. Much better to keep the unitless-0 limited to lengths, with the few angle exceptions explicitly called out as exceptions. Maybe we can get this reversed, with evidence that it's causing grammar problems.)

  2. tabatkins commented on Apr 3, 2017

    @tabatkins
    Member

    Agenda+ to discuss the above - generic "angles can have unitless 0 too" resolution is causing grammar problems. Can we revisit the decision?

  3. added 2 commits that reference this issue on Apr 11, 2017
  4. added 2 commits that reference this issue on Apr 11, 2017
  5. 9 remaining items

  6. ewilligers commented on May 25, 2017

    @ewilligers
    ContributorAuthor

    I have added use counters to Blink. We will know in three months how often unitless 0 is being used in gradients and filter and transform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions