Skip to content

[scroll-animations-1] scroll-timeline and view-timeline shorthand syntax #7627

@bramus

Description

@bramus

The syntax for the scroll-timeline shorthand is defined as such:

scroll-timeline: <'scroll-timeline-axis'> || <'scroll-timeline-name'>

The syntax for the view-timeline shorthand is defined as such:

view-timeline: [<'view-timeline-name'> || <'view-timeline-axis'>]#

It’s odd that the scroll-timeline has the name mentioned first, while in view-timeline it is the axis. Even though the order of both does not matter – due to || – I would like to see these listed in the same order for consistency reasons.


Going further, maybe we should disallow reordering the values? There is precedent to have the *-name first: the container shorthand has the container-name first and then the container-type.

container: <'container-name'> [ / <'container-type'> ]?

Maybe we can update the scroll-timeline and view-timeline shorthands to follow the form of the container shorthand? Like so:

scroll-timeline: <'scroll-timeline-name'> [ / <'scroll-timeline-axis'> ]?
view-timeline: [<'view-timeline-name'> [ / <'view-timeline-axis'> ]?]#

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