Skip to content

[css-color-5] Custom color profiles: <custom-ident> or <dashed-ident>? #7374

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

Closed
fantasai opened this issue Jun 15, 2022 · 3 comments
Closed

Comments

@fantasai
Copy link
Collaborator

In general in CSS we use <custom-ident> for CSS-internal identifiers, see @namespace, @font-face, @counter-style. Color 5 proposes to use <dashed-ident> for color profile names (@color-profile), which is inconsistent. Should it be switched to <custom-ident> or is there some compelling reason why color profile names need to be different?

@fantasai fantasai added the css-color-5 Color modification label Jun 15, 2022
@svgeesus
Copy link
Contributor

svgeesus commented Jun 15, 2022

Because @tab made me do it :) when he said:

so I guess I lean slightly toward --idents, since the names are declared by the author in the @color-profile rule.
#4654 (comment)

and then added something for me to link to:

Done, you can refer to <<dashed-ident>> now:
#4654 (comment)

@svgeesus
Copy link
Contributor

But in general look at [css-color-4] The color() function <ident> doesn't seem to be future proof #4654 which is where we went for explicitly author defined idents since they can be mixed in with standardized and later-standardized ones:

If not handled carefully, this can result in difficulties adding new CSS-defined values; UAs have to study existing usage and gamble that there are sufficiently few author-defined identifiers in use matching the new CSS-defined one, so giving the new value a special CSS-defined meaning won’t break existing pages.

@tabatkins
Copy link
Member

Right, we have dashed-idents specifically for the case where we're mixing them with CSS-defined idents (or would otherwise have parsing ambiguities for some other reason). This is 100% one of those cases, so dashed-ident is required.

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

No branches or pull requests

3 participants