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

  1. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
  2. 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.
  3. Read Resolved keyword token and interpret units, signs, ordering and placeholders as explained below.
  4. 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 fieldMeaningValue typeRequirement
keywordKeywordstringRequired; constraints below
propertyNormallyInheritedProperty normally inheritedbooleanRequired; constraints below
callerParentTokenCaller parent tokenstringRequired; constraints below
callerInitialTokenCaller initial tokenstringRequired; constraints below
callerOriginRollbackTokenCaller origin rollback tokenstringRequired; 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 fieldMeaningValue type
resolvedKeywordTokenResolved keyword tokenstring
json
{
  "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

  1. inherit/initial/unset/revert Resolution Table — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies