Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andruud opened this issue Apr 21, 2023 · 5 comments
Closed

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

andruud opened this issue Apr 21, 2023 · 5 comments

Comments

@andruud
Copy link
Member

andruud commented Apr 21, 2023

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.

@bramus
Copy link
Contributor

bramus commented 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.

@bramus bramus added the scroll-animations-1 Current Work label Apr 25, 2023
@tabatkins
Copy link
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.)

@bramus
Copy link
Contributor

bramus commented 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
Copy link
Contributor

flackr commented 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 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.

@flackr flackr added the Agenda+ label Apr 27, 2023
@css-meeting-bot
Copy link
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>
@fantasai fantasai closed this as completed Jun 6, 2023
devongovett added a commit to devongovett/csswg-drafts that referenced this issue May 17, 2024
…eline

In w3c#8746 it was resolved to switch from `<custom-ident>` to `<dashed-ident>` for timeline names, and this was done in the grammar in 9f39808. However, further down in the spec, it still shows `<custom-ident>`
birtles pushed a commit that referenced this issue May 21, 2024
…eline

In #8746 it was resolved to switch from `<custom-ident>` to `<dashed-ident>` for timeline names, and this was done in the grammar in 9f39808. However, further down in the spec, it still shows `<custom-ident>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment