CSS <dashed-ident> Data Type
The <dashed-ident> data type is a name you choose that starts with two dashes, such as --brand. It is used for custom properties and other author names.
Description
The <dashed-ident> CSS data type represents an author-defined name that begins with two hyphens (--). It is a special form of <custom-ident> that CSS reserves for authors: the language will never define its own keywords starting with --, so these names can never clash with current or future CSS features. The best-known use is naming custom properties (CSS variables), such as --brand-color, which are then read with the var() function.
Beyond custom properties, <dashed-ident> is used wherever CSS needs a name that is guaranteed not to collide with keywords. Examples include the name of an @property rule, anchor-name and position-anchor for anchor positioning, scroll-timeline-name and view-timeline-name for scroll-driven animations, and the name given to an @font-palette-values rule.
Like other identifiers, a <dashed-ident> is case-sensitive, so --Accent and --accent are different names. After the two leading hyphens it can contain letters, digits, hyphens, underscores, non-ASCII characters and escaped characters. The name -- on its own is reserved and should not be used.
Examples:
/* Custom properties */
:root {
--brand-color: #0b69ff;
--radius: 12px;
}
.button {
background: var(--brand-color);
border-radius: var(--radius);
}
/* A registered, typed custom property */
@property --progress {
syntax: "<percentage>";
inherits: false;
initial-value: 0%;
}
/* Anchor positioning */
.trigger {
anchor-name: --menu-button;
}
.menu {
position: absolute;
position-anchor: --menu-button;
}
Because every <dashed-ident> lives in the author's namespace, it is a safe choice for design tokens, theme variables and any other names shared across a stylesheet.
Interactive Demo
Themed card
Syntax
property: <dashed-ident>;
Values
- <dashed-ident>An identifier that starts with two hyphens (--), followed by letters, digits, hyphens, underscores, non-ASCII characters or escaped characters. It is case-sensitive, and the name -- on its own is reserved.
Example
Browser Support
The following information will show you the current browser support for the CSS dashed-ident data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.
Desktop





Tablets & Mobile





