You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[scroll-animations-1] Require <dashed-ident> for timeline names #8746
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.
Reacted by Chris Lilley, Sebastian Zartner and Robert Flack
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?
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.)
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.
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>
Activity
bramus commentedon Apr 24, 2023
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.
tabatkins commentedon Apr 25, 2023
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.
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.)
bramus commentedon Apr 25, 2023
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.
flackr commentedon Apr 27, 2023
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 theanimationshorthand 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.css-meeting-bot commentedon May 17, 2023
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>
[scroll-animations-1] Switch timeline names to <dashed-ident> #8746
[css-animations-2] Switch timeline names from <custom-ident> to <dash…
[css-animations-2] Fix custom-ident to dashed-ident for animation-tim…
[css-animations-2] Fix custom-ident to dashed-ident for animation-tim…