Skip to content

[scroll-animations-1] Require <dashed-ident> for timeline names #8746

Closed

Description

@andruud

Split out from #7759:

@tabatkins wrote:

timeline names are <custom-ident> right now. Is that a necessity? Making it <dashed-ident> would be nice since it would avoid the grammar ever clashing in the future with new keywords.

+1, this will make future changes to the syntax easier.

Activity

  1. bramus commented on Apr 24, 2023

    @bramus
    Contributor

    I don’t see the exact need right now. <custom-ident> is used for a lot of name-giving-things; AFAIK only CSS Anchor Positioning requires a <dashed-ident> for the name.

    That said, also not opposed to <dashed-ident> as it keeps things open syntax-wise. @tabatkins: As you raised this, is the intention here to use <dashed-ident> for name-things across all upcoming/future specs from now on?

    Curious to hear what @fantasai, @flackr, and @ydaniv think about this.

  2. tabatkins commented on Apr 25, 2023

    @tabatkins
    Member

    No, we use dashed-ident in a few places, like custom color space names. We do have a bunch of custom names that predate the dashed-ident technology, tho, so our consistency isn't great.

    As you raised this, is the intention here to use for name-things across all upcoming/future specs from now on?

    In general, yes. We don't want another repeat of the 'animation' shorthand fiasco. A plain custom-ident is fine if it's positionally fixed (requiring to go first, for example); if it can be mixed arbitrarily, as is usually the case in CSS, we really want to shift those to dashed-ident to avoid compat pain.

    (And, anecdotally, it seems many people find it nice to have the dashed-ident in a complex value, as it makes it easy to pick out from the CSS-defined keywords at a glance.)

  3. bramus commented on Apr 25, 2023

    @bramus
    Contributor

    Cool. Then definitely OK with using <dashed-ident>.

    Would also like the resolution to include that from now, in general, dashed-idents are the recommended way to name things.

  4. flackr commented on Apr 27, 2023

    @flackr
    Contributor

    I'm good with requiring a <dashed-ident> for timeline names. It makes sense to try to avoid potential clashes in our shorthands.

    Thinking about animation timelines specifically, it probably doesn't help for the animation shorthand since we already have animation-name as a <custom-ident> so we'd probably have to say in the animation shorthand that we interpret the first identifier as the animation name and the second as the timeline if specified. However, it should help avoid conflicts in the shorthands for establishing scroll and view timelines.

  5. css-meeting-bot commented on May 17, 2023

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [scroll-animations-1] Require <dashed-ident> for timeline names, and agreed to the following:

    • RESOLVED: Switch timeline names to <dashed-ident>
    The full IRC log of that discussion <TabAtkins> flackr: In the current spec we use <custom-ident> for timeline names
    <TabAtkins> flackr: But in previous specs this has resulted in compat risk as we add new identifiers, as they might clash with author-provided custom idents.
    <TabAtkins> flackr: So I propose we use <dashed-ident> for timeline names. We do this already in a few other properties.
    <TabAtkins> +1
    <ydaniv> +1
    <bramus> +1
    <fantasai> I don't like it but I won't object :)
    <TabAtkins> proposed resolution: Switch timeline names to <dashed-ident>
    <TabAtkins> miriam: Objections?
    <TabAtkins> RESOLVED: Switch timeline names to <dashed-ident>
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