inherit/initial/unset/revert Resolution Table
Ordinary property CSS-wide keyword resolution from caller parent/initial/origin-rollback evidence; revert is not always initial and revert-layer is separate. Explicit supplied computed/layout context only; not a browser cascade/layout engine or cross-browser guarantee.
Description
CSS-wide keywords choose parent, initial or rollback values under defined rules.
CSS-wide keywords choose parent, initial or rollback values under defined rules.1
A supplied-token model does not calculate an entire cascade or validate property syntax. Use inherit/initial/unset/revert Resolution Table to evaluate the supplied inputs under the specific model below.
When to use inherit/initial/unset/revert Resolution Table
Use inherit/initial/unset/revert Resolution Table to evaluate the supplied inputs under the specific model below. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
How to use inherit/initial/unset/revert Resolution Table and understand its results
- Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
- Enter Keyword, Property normally inherited, Caller parent token, Caller initial token, Caller origin rollback token using the field table and validation rules below, then run the tool.
- Read Resolved keyword token and interpret units, signs, ordering and placeholders as explained below.
- If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| keyword | Keyword | string | Required; constraints below |
| propertyNormallyInherited | Property normally inherited | boolean | Required; constraints below |
| callerParentToken | Caller parent token | string | Required; constraints below |
| callerInitialToken | Caller initial token | string | Required; constraints below |
| callerOriginRollbackToken | Caller origin rollback token | string | Required; constraints below |
Enter exactly inherit, initial, unset or revert, a normally-inherited boolean, and caller parent, initial and origin-rollback token strings. inherit selects parent; initial selects initial; unset selects parent for an inherited property and initial otherwise; revert selects the supplied rollback token. The tool neither computes that rollback value nor parses CSS declarations.
selected = inherit→parent, initial→initial, unset→(inherited?parent:initial), revert→originRollback Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| resolvedKeywordToken | Resolved keyword token | string |
{
"input": {
"keyword": "unset",
"propertyNormallyInherited": true,
"callerParentToken": "red",
"callerInitialToken": "black",
"callerOriginRollbackToken": "green"
},
"output": {
"resolvedKeywordToken": "red"
}
} Limitations and assumptions
A supplied-token model does not calculate an entire cascade or validate property syntax. Apply the exact scope and assumptions described above.
All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.
Alternative or Complementary methods
Use @layer revert-layer Cascade Order Lookup for a related task: Cascade layers have ordering rules that differ for normal and important declarations.
Use CSS Variable Fallback Chain Resolution for a related task: A custom-property reference can resolve through other variables and a missing-reference fallback.
References
Similar or alternative tools
- @layer revert-layer Cascade Order Lookup
Cascade layers have ordering rules that differ for normal and important declarations.
- CSS Variable Fallback Chain Resolution
A custom-property reference can resolve through other variables and a missing-reference fallback.