Definition and Usage
<user-ident> CSS data value denotes an arbitrary user-defined string used as an identifier.
Its syntax is similar to the CSS identifier one, except that it is case-sensitive: a
<user-ident> is a sequence of characters where characters can be:
- any alphanumeric character (A to Z, or a to z),
- any decimal digit (0 to 9),
- a dash ('
- an underscore ('
- a escaped character (with a backslash, '
- or a Unicode character (in the format of a backslash followed by one to six hexadecimal digits, its Unicode code point).
The first character must not be a decimal digit nor a dash ('
-') followed by a decimal digit or another dash. A
<user-ident> must not be placed between single or double quotes as it would be identical to a
ID1 are all different identifiers as they are case-sensitive. In the opposite, as they are several way to escape a character,
toto\3F are the same identifiers.
These are valid identifiers:
nono79 A mix of alphanumeric characters and numbers ground-level A mix of alphanumeric characters and a dash -test A dash followed by an alphabetic character _internal An underscore followed by alphanumeric characters \22 toto A Unicode character followed by a sequence of alphanumeric character bili\.bob The period is correctly escaped
These are invalid identifiers:
34rem It must not start with a decimal digit. -12rad It must not start with a dash followed by a decimal digit. bili.bob Only alphanumeric characters, _ and - need not being escaped. --toto It must not start with two dashes. 'bilibob' It isn't an <user-ident>, it is a
<string>. "bilibob" It isn't an <user-ident>, it is a
|Feature||Chrome||Firefox (Gecko)||Internet Explorer||Opera||Safari (WebKit)|
|Feature||Android||Firefox Mobile (Gecko)||IE Phone||Opera Mobile||Safari Mobile|