A card with –id:”card” and sibling-index() equal to 3 can use view-transition-name:ident(var(–id) “-” sibling-index()) to construct the identifier card-3 under the draft. Directly substituting the quoted pieces into a property that expects
This lesson continues The Gold Standard of Websites, the Gold Standard of Education and the How X Works hub. Every identifier, string, sibling index and named feature is an original synthetic fixture. The lesson does not promise shipping support, assert that every identifier is valid for every property or treat generated names as durable application identity.
Record every source piece and token type, substitution result, computed piece, concatenated text, identifier representability, excluded keywords, destination grammar, name matching, browser build and unavailable behavior.
The CSS Values and Units Module Level 5 defines ident() as an arbitrary substitution function for constructing identifiers. The CSS Values and Units Module Level 4 distinguishes identifiers, custom identifiers and strings. The current Values Level 5 text is early exploration and may change, so examples are teaching fixtures rather than deployment promises.
THE GOLD STANDARD · WEBSITES
ident() constructs a CSS identifier; substitution alone does not change a string into an identifier
The proposed ident() function concatenates computed string, integer and identifier pieces and returns an identifier when the result can be represented as one. A var() or attr() substitution can supply tokens, but a quoted string remains a string unless a function such as ident() explicitly constructs an identifier. This matters for names such as view-transition-name, anchor-name and timeline names.
Fast route
Start with the decisive rule.
Start this route
Measurement route
Build the browser state and evidence ledger.
Start this route
Comparison route
Separate the nearest lookalikes.
Start this route
Transfer route
Change the context and retest.
Start this route
Reporting route
State limits and continue reading.
Start this route
Chapter contents
Open the full chapter index
- 1. Give token type priority
- 2. Read the accepted pieces
- 3. Concatenate after computation
- 4. Require representable output
- 5. Distinguish custom-ident restrictions
- 6. Build dashed identifiers deliberately
- 7. Keep attr and ident jobs separate
- 8. Keep var substitution separate
- 9. Use sibling-index as data, not identity
- 10. Separate name construction from name matching
- 11. Preserve case sensitivity
- 12. Handle escaping and serialization
- 13. Test invalid source pieces
- 14. Do not invent security identity
- 15. Treat unsupported syntax as unavailable
- 16. Compare equal pixels and different names
- 17. Build a reproducible identifier ledger
- 18. Use the owning specifications and continue
1. Give token type priority
A CSS string and a CSS identifier can contain similar characters but are different token types. ident() exists to construct an identifier.
Original worked example. “card” is a string; card is an identifier. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Add spaces and escapes. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Inspect tokens, not rendered text. If this check fails, mark the claim unavailable and repair the method before continuing.
Keep grammar, substitution, inheritance, destination parsing and computed result in separate fields so matching pixels cannot rewrite the mechanism.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
2. Read the accepted pieces
The draft accepts strings, integers and identifiers as pieces. Other unresolved value types make replacement invalid.
Original worked example. ident(“item-” 3) constructs item-3. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Replace 3 with 3.5 or a length. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record each computed piece and acceptance. If this check fails, mark the claim unavailable and repair the method before continuing.
Use a positive case, a clean negative case and an unavailable case. Unavailable means the required syntax or evidence was not established.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
3. Concatenate after computation
Substitutions happen before the pieces are parsed and computed; then their serialized text is concatenated.
Original worked example. A var() supplies “card” and sibling-index supplies 4. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Change the custom property to an unresolved function. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Save pre- and post-substitution pieces. If this check fails, mark the claim unavailable and repair the method before continuing.
Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
4. Require representable output
An empty result or text that cannot be represented as an identifier yields the guaranteed-invalid value.
Original worked example. ident(“”) cannot create a usable identifier. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Prefix the empty source with “item-“. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Check representability before destination matching. If this check fails, mark the claim unavailable and repair the method before continuing.
Carry one plausible alternative through the ledger, then choose the next observation that separates it from the leading account.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
5. Distinguish custom-ident restrictions
A syntactically valid identifier may still be excluded from a property’s
Original worked example. ident(“inherit”) forms identifier text but cannot serve where inherit is excluded as a custom ident. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Prefix it with item-. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Apply the destination’s excluded-keyword rules. If this check fails, mark the claim unavailable and repair the method before continuing.
Name the relevant element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
6. Build dashed identifiers deliberately
A dashed identifier can be constructed by beginning with a — identifier segment, as the draft example shows.
Original worked example. anchor-name:ident(– attr(id)) can form a dashed name. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Remove the leading — segment. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Verify the destination expects a dashed ident. If this check fails, mark the claim unavailable and repair the method before continuing.
Archive source, fixture, rules, computed styles, browser version and raw exceptions so another reader can reproduce the conclusion.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
7. Keep attr and ident jobs separate
attr() retrieves an attribute and may parse it as a custom-ident, while ident() can combine values from multiple sources into one identifier.
Original worked example. A parent prefix and element attribute become one view-transition name. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Use only attr(id type(
Practical evidence check. Record whether composition was required. If this check fails, mark the claim unavailable and repair the method before continuing.
Keep grammar, substitution, inheritance, destination parsing and computed result in separate fields so matching pixels cannot rewrite the mechanism.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
8. Keep var substitution separate
var() substitutes a custom property’s token stream. It does not promise to merge adjacent strings and integers into one identifier.
Original worked example. var(–name) works when –name already stores an identifier. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Store a quoted string instead. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Compare substituted token types. If this check fails, mark the claim unavailable and repair the method before continuing.
Use a positive case, a clean negative case and an unavailable case. Unavailable means the required syntax or evidence was not established.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
9. Use sibling-index as data, not identity
A tree-relative index can help construct a name, but DOM insertion changes it. The resulting identifier is contextual, not durable business identity.
Original worked example. card-3 becomes card-4 after an earlier sibling is inserted. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Use a stable data attribute instead. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record DOM order and naming purpose. If this check fails, mark the claim unavailable and repair the method before continuing.
Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
10. Separate name construction from name matching
ident() can construct a name, while view transitions, anchors or timelines have their own matching and scoping rules.
Original worked example. Both old and new elements construct card-3 and can match under the feature’s rules. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Change one scope or name source. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Keep constructed value and matching outcome separate. If this check fails, mark the claim unavailable and repair the method before continuing.
Carry one plausible alternative through the ledger, then choose the next observation that separates it from the leading account.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
11. Preserve case sensitivity
Author-defined custom identifiers are generally case-sensitive unless a specific feature says otherwise. Similar letters with different case can name different things.
Original worked example. Card-3 and card-3 are compared as distinct custom identifiers. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Normalize the source string. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Archive exact Unicode and escapes. If this check fails, mark the claim unavailable and repair the method before continuing.
Name the relevant element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
12. Handle escaping and serialization
The function serializes pieces before concatenation, and CSS escaping can make source spelling differ from identifier value.
Original worked example. A space or punctuation may require escaping in serialization. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Compare raw source and computed serialization. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record identifier value separately from author spelling. If this check fails, mark the claim unavailable and repair the method before continuing.
Archive source, fixture, rules, computed styles, browser version and raw exceptions so another reader can reproduce the conclusion.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
13. Test invalid source pieces
A function that cannot resolve at computed-value time prevents ident() from producing an identifier.
Original worked example. One piece is an unresolved future function. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Replace it with an integer. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Mark failure at the piece-computation stage. If this check fails, mark the claim unavailable and repair the method before continuing.
Keep grammar, substitution, inheritance, destination parsing and computed result in separate fields so matching pixels cannot rewrite the mechanism.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
14. Do not invent security identity
Generated CSS names are for styling and feature matching, not authentication, authorization or stable record keys.
Original worked example. A visual transition name is harmless; an account key is not. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Expose the same text to application logic. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Reject identity claims outside CSS semantics. If this check fails, mark the claim unavailable and repair the method before continuing.
Use a positive case, a clean negative case and an unavailable case. Unavailable means the required syntax or evidence was not established.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
15. Treat unsupported syntax as unavailable
A dropped ident() declaration has not generated an empty name. Use a tested baseline or explicit static name.
Original worked example. view-transition-name:card remains when a later ident() is unsupported. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Run a supporting build. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Record parser support and computed property. If this check fails, mark the claim unavailable and repair the method before continuing.
Change one consequential premise while keeping the rest fixed. Predict the new branch before inspecting it and preserve disagreement.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
16. Compare equal pixels and different names
Two pages can render alike while their identifier construction and matching differ. Pixels cannot prove the computed name.
Original worked example. A transition is not triggered although static screenshots match. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Inspect computed names and scopes. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Require name-ledger evidence. If this check fails, mark the claim unavailable and repair the method before continuing.
Carry one plausible alternative through the ledger, then choose the next observation that separates it from the leading account.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
17. Build a reproducible identifier ledger
Preserve source pieces, token types, substitutions, computed pieces, concatenated identifier, serialization, destination validity and match result.
Original worked example. The matrix covers strings, integers, identifiers, empty output, excluded keywords and reordered siblings. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. Repeat with attr and a dashed ident. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Version the draft and browser. If this check fails, mark the claim unavailable and repair the method before continuing.
Name the relevant element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Previous chapter · Contents · Next chapter
18. Use the owning specifications and continue
Values Level 5 owns ident(); Values Level 4 owns identifier and string types; Variables Level 2 owns var substitution.
Original worked example. The route follows tokens, substitution, construction, destination and matching. The declarations, values and observations are explicit so the reader can reconstruct the decision instead of trusting a label.
Changed-context transfer. When the grammar changes, rerun all construction cases. State what changed, predict the consequence and revise only the conclusion that depended on that condition.
Practical evidence check. Save exact source URLs, access date and raw computed styles. If this check fails, mark the claim unavailable and repair the method before continuing.
Archive source, fixture, rules, computed styles, browser version and raw exceptions so another reader can reproduce the conclusion.
Before closing, reconcile the original fixture against the chapter rule: identify the element, declaration, source tokens, inherited value, parsed type, identifier, candidate list or animation state and the first missing obligation; change one condition and mark the first unsupported inference. Preserve the raw trace beside the revised result. End the chapter with three sentences: what the evidence establishes, what it does not establish and what observation would change the conclusion. This keeps the lesson useful when the browser, stylesheet or document state changes. A strong record also names the datum, denominator, section or coordinate system that governed the decision, so a later reader can repeat the reasoning without importing an unstated shortcut.
Grouped reading routes
Core route
Companion lessons
- Separating CSS inherit() Function from the inherit Keyword
- Separating attr() Typed Parsing from raw-string Attribute Substitution
- Separating cycle() Inherited-Value Selection from Animation Iteration
Related specialist lessons
Sources and further study
CSS Values and Units Module Level 5. Used for the standard definitions, material mechanisms or method limits developed in this lesson.
CSS Values and Units Module Level 4. Used for the standard definitions, material mechanisms or method limits developed in this lesson.
CSS Custom Properties for Cascading Variables Module Level 2. Used for the standard definitions, material mechanisms or method limits developed in this lesson.
The worked examples and transfer checks are developed here and state their own assumptions. The linked sources support the underlying CSS parsing, substitution, inheritance and cascade principles.
Return to contents · Return to The Gold Standard of Websites