The <dashed-ident>
CSS data type denotes an arbitrary string used as an identifier.
The <dashed-ident>
CSS data type denotes an arbitrary string used as an identifier.
The syntax of <dashed-ident>
is similar to CSS identifiers (such as property names), except that it is case-sensitive. It starts with two dashes, followed by the user-defined identifier.
The double dash at the beginning makes them easily identifiable when reading through a CSS code block.
Just like <custom-ident>
<dashed-ident>
s are defined by the user, but unlike <custom-ident>
CSS will never define a <dashed-ident>
.
When <dashed-ident>
is used with CSS custom properties, the property is declared first and then used within a CSS var() function.
When <dashed-ident>
is used with the @color-profile at-rule, the at-rule is declared first and then used within a CSS color() function.
When <dashed-ident>
is used with the @font-palette-values at-rule, the at-rule is declared first and then used as the value for the font-palette property.
Specification |
---|
CSS Values and Units Module Level 4 # dashed-idents |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/dashed-ident