<custom-ident>
Quick Summary for <custom-ident>
The <custom-ident> CSS data type denotes an arbitrary user-defined string used as an identifier. It is case-sensitive, and certain values are forbidden in various contexts to prevent ambiguity.
Code Usage for <custom-ident>
nono79            A mix of alphanumeric characters and numbers ground-level      A mix of alphanumeric characters and a dash -test             A dash followed by alphanumeric characters _internal         An underscore followed by alphanumeric characters \22 toto          A Unicode character followed by a sequence of alphanumeric characters bili\.bob         A correctly escaped period 
More Details for <custom-ident>

<custom-ident>

The <custom-ident> CSS data type denotes an arbitrary user-defined string used as an identifier. It is case-sensitive, and certain values are forbidden in various contexts to prevent ambiguity.

Syntax

The syntax of <custom-ident> is similar to CSS identifiers (such as property names), except that it is case-sensitive. It consists of one or more characters, where characters can be any of the following:

any alphabetical character (A to Z, or a to z), any decimal digit (0 to 9), a hyphen (-), an underscore (_), an escaped character (preceded by a backslash, \), a Unicode character (in the format of a backslash, \, followed by one to six hexadecimal digits, representing its Unicode code point)

Note that id1, Id1, iD1 and ID1 are all different identifiers as they are case-sensitive. On the other hand, as there are several ways to escape a character, toto\? and toto\3F are the same identifiers.

Forbidden values

A <custom-ident> must not be placed between single or double quotes as this would be identical to a <string>. Moreover, the first character must not be a decimal digit, nor a hyphen (-) followed by a decimal digit or another hyphen.

To prevent ambiguity, each property that uses <custom-ident> forbids the use of specific values:

animation-name

Forbids the global CSS values (unset, initial, and inherit), as well as none.

counter-reset, counter-increment

Forbids the global CSS values (unset, initial, and inherit), as well as none.

@counter-style, list-style-type

Forbids the global CSS values (unset, initial, and inherit), as well as the values none, inline, and outside. Also, quite a few predefined values are implemented by the different browsers: disc, circle, square, decimal, cjk-decimal, decimal-leading-zero, lower-roman, upper-roman, lower-greek, lower-alpha, lower-latin, upper-alpha, upper-latin, arabic-indic, armenian, bengali, cambodian, cjk-earthly-branch, cjk-heavenly-stem, cjk-ideographic, devanagari, ethiopic-numeric, georgian, gujarati, gurmukhi, hebrew, hiragana, hiragana-iroha, japanese-formal, japanese-informal, kannada, katakana, katakana-iroha, khmer, korean-hangul-formal, korean-hanja-formal, korean-hanja-informal, lao, lower-armenian, malayalam, mongolian, myanmar, oriya, persian, simp-chinese-formal, simp-chinese-informal, tamil, telugu, thai, tibetan, trad-chinese-formal, trad-chinese-informal, upper-armenian, disclosure-open, and disclosure-close.

grid-row-start, grid-row-end, grid-column-start, grid-column-end

Forbids the span value.

will-change

Forbids the global CSS values (unset, initial, and inherit), as well as the values will-change, auto, scroll-position, and contents.

Examples

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 alphanumeric characters _internal         An underscore followed by alphanumeric characters \22 toto          A Unicode character followed by a sequence of alphanumeric characters bili\.bob         A correctly escaped period 

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 - needn't be escaped. --toto            It must not start with two dashes. This would be a custom property. 'bilibob'         This would be a <string>. "bilibob"         This would be a <string>. 

Specifications

Specification Status Comment
CSS Values and Units Module Level 4The definition of '<custom-ident>' in that specification. Editor's Draft
CSS Will Change Module Level 1The definition of '<custom-ident> for will-change' in that specification. Candidate Recommendation Defines which values are excluded for will-change.
CSS Counter Styles Level 3The definition of '<custom-ident> for list-style-type' in that specification. Candidate Recommendation Uses <custom-ident> instead of a finite list of keywords. Defines which values are excluded for list-style-type and @counter-style.
CSS Lists Module Level 3The definition of '<custom-ident> for counter-*' in that specification. Working Draft Renames <identifier> to <custom-ident>. Adds its usage to the new counter-set property.
CSS Animations Level 1The definition of '<custom-ident> for animation-name' in that specification. Working Draft Defines which values are excluded for animation-name.
CSS Values and Units Module Level 3The definition of '<custom-ident>' in that specification. Candidate Recommendation Renames <identifier> to <custom-ident>. Makes it a pseudo-type and forbids the use of excluded values.
CSS Level 2 (Revision 1)The definition of '<identifier>' in that specification. Recommendation Initial definition.

As this type is not a real type but a convenience type used to simplify the description of allowed values, there is no browser compatibility information as such.

See also

<ident> Select your preferred language English (US)DeutschFrançais日本語Русский中文 (简体) Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote

"Olivia, my eldest daughter, caught measles when she was seven years old. As the illness took its usual course I can remember reading to her often in bed and not feeling particularly alarmed about it. Then one morning, when she was well on the road to recovery, I was sitting on her bed showing her how to fashion little animals out of coloured pipe-cleaners, and when it came to her turn to make one herself, I noticed that her fingers and her mind were not working together and she couldn’t do anything. 'Are you feeling all right?' I asked her. 'I feel all sleepy,' she said. In an hour, she was unconscious. In twelve hours she was dead. The measles had turned into a terrible thing called measles encephalitis and there was nothing the doctors could do to save her. That was...in 1962, but even now, if a child with measles happens to develop the same deadly reaction from measles as Olivia did, there would still be nothing the doctors could do to help her. On the other hand, there is today something that parents can do to make sure that this sort of tragedy does not happen to a child of theirs. They can insist that their child is immunised against measles. ...I dedicated two of my books to Olivia, the first was ‘James and the Giant Peach’. That was when she was still alive. The second was ‘The BFG’, dedicated to her memory after she had died from measles. You will see her name at the beginning of each of these books. And I know how happy she would be if only she could know that her death had helped to save a good deal of illness and death among other children."

I just checked google books for BFG, and the dedication is there. 

https://www.google.com.au/books/edition/_/quybcXrFhCIC?hl=en&gbpv=1 


Roald Dahl, 1986
Random CSS Property

<frequency-percentage>

Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.
<frequency-percentage> css reference