---
title: "CSSOM support: element sheets, selector text, declaration validity, calc(), platform defaults and registered properties"
url: https://recursiveai.org/onehtml/docs/cssom-support/
description: "What a script runtime needs from the cascade to implement CSSOM and the Properties and Values API without rewriting markup. Everything here is additive…"
version: "1.8.0"
source: https://github.com/recursive-ai-oss/onehtml-csharp/blob/9213d47aed47f691bf05853759fd8e328a6a980e/docs/cssom-support.md
---

# CSSOM support: element sheets, selector text, declaration validity, calc(), platform defaults and registered properties

What a script runtime needs from the cascade to implement CSSOM and the Properties and Values API without rewriting markup. Everything here
is additive; the behaviour of documents that use none of it is unchanged.

## 1. Style sheets set on elements

CSSOM 6.1: the sheet of a `style` or `link` element is an object the cascade reads. Editing it (`insertRule`, `deleteRule`, `replaceSync`,
`disabled`) changes neither the element's text nor its attributes and produces no mutation record.

- `MutableNode.OwnSheet` (an `ElementSheet`, null by default) is held by an element of the mutable layer. `ElementSheet.Resource` is the sheet to use
  (text or bytes with a transport encoding label, a `StylesheetResource`); a null `Resource` means "use the element's own text, or what the
  resolver supplies for a `link`". `ElementSheet.Disabled` stops the sheet applying whatever the element's attributes say.
- For a `style` element the resource replaces the sheet parsed from the text. For a `link` element it is the sheet that arrived: it is used without
  calling `StyleSourceOptions.Resolver`, its URL is the `href` resolved against the document's base URL (`@import` and `url()` in it resolve against
  that), and a URL that cannot be resolved only leaves it without a base. `rel`, `type`, `media`, `disabled` and `href` still decide whether
  the element applies; the sheet counts against `MaxSheets` and the parse limits like any other.
- Setting it is reported in the next commit's `DocumentChanges.AdoptedStyleSheetsChanged` (the list is "holders whose sheets changed": document,
  shadow roots and these elements) and makes `Impact` include `StyleSheets`. `DocumentStylesMutation.Restyle` and `LiveDocumentStyles.Rebase`
  then gather the sheets again and restyle only the elements the old and new rules reach (a 200-element page with a two-rule replacement
  restyles without a full recompute), and the result equals `DocumentStyles.Create` with `MutableDocument.CreateStyleSourceOptions`.
- `StyleSourceOptions.ElementSheets` (node to `ElementSheet`) is the same thing for callers that build styles over an immutable `Document`.
  `CreateStyleSourceOptions` fills it from the document's state at the snapshot's version, so older snapshots keep the sheets they had.
- The sheet is held as text or bytes and parsed when styles are gathered, like a `style` element's text; a host that edits rules
  keeps its own rule list and sets the serialized text. A sheet set on an element that is removed and inserted again stays with it.

## 2. Selector text

`SelectorList.ToHtmlString()` is `selectorText` in an HTML document (CSSOM 6.7.2, "serialize a selector"): type selectors and attribute names are
written in ASCII lower case (`A.B>C` is `a.B > c`, `[DATA-X]` is `[data-x]`), class names, ids and attribute values keep their case, and
pseudo-class and pseudo-element names are lower case. `ToString()` is unchanged (names as written), which is right for documents where
type selectors are case-sensitive. The lower-casing applies to every type name, including SVG's camel-case ones (`foreignObject`), as
browsers store them.

Known differences, listed in `testdata/wpt/cssom/expectations.txt` with the WPT replay: a `:lang()` argument that needs escaping is written as a string, and
`*|` is kept when no default namespace is declared.

## 3. Declaration validity

`DeclarationSupport.IsSupported` (CSS Conditional 3 6.1; `CSS.supports(property, value)`, and a style declaration setter that ignores invalid values) now
matches a value against the property's grammar when the grammar is more than keywords and simple types. The matcher (`ValueGrammar`, CSS Values 4 section 2)
handles juxtaposition, `|`, `||`, `&&`, brackets, `? * + # {A,B}`, functions and `<'property'>` references. It keeps the set of reachable positions
instead of backtracking, so its cost is the grammar size times the value size and nothing recurses on the value's depth. `<length>`, `<number>`,
`<color>` and the other types the earlier checker knew are matched as before (so `calc(1px+2px)`, which needs whitespace around `+`, is
invalid), plus `<line-width>`, `<line-style>`, `<box-size>` and `<transform-function>`.

Value definitions written out by hand (`ValueGrammar.Definitions.cs`) cover the properties whose table entry names types the matcher does not define: about 100 properties
(blend modes, background and mask layers, `box-shadow`, `text-shadow`, the grid track and line grammars, filters, transforms, basic shapes for `clip-path`, `shape-outside` and `offset-path`,
`offset`, counters, `content`, `list-style`, the text-box, text-spacing and autospace properties, `cursor`, `will-change`, font settings and `font-palette`, `aspect-ratio`,
`contain-intrinsic-size`, the multi-column rule longhands and more), each from the current specification text. Types such as `<position>`, `<track-size>` or `<filter-fn>` are defined
in the same file in terms of the grammar and expand in place, so one may span several component values. The grammar notation adds `'[' ... ']'` for a square-bracket block, `<ident-not:a,b>`
for a custom identifier other than the listed words, and a few single-value predicates (`<opentype-tag>`, `<area-string>`, `<svg-path>`, `<nonzero-integer>`, `<angle-strict>`). For these properties the
definition decides the value when it can: a match is supported, a non-match is not, and "unknown" falls back to the older checks. `GrammarSoundnessTests` lists two more declarations that the cascade keeps and the
specifications make invalid (`shape(... foo())` and `rotateZ()` with four arguments). `flex`, `flex-flow`, `size`, `animation-range` and `border-image` also expand to longhands
(`Shorthands.Layout.cs`).

Images are matched by their own grammar too (CSS Images 4): `<image>` is `<url>` or one of `linear-gradient()`, `radial-gradient()`, `conic-gradient()` and their `repeating-` forms, `image(<color>)`, `image-set()`,
`cross-fade()` (each `<cf-image>` has a percentage between 0% and 100%), `light-dark(<image>, <image>)`, and `element()`, `paint()`, `src()` and the prefixed gradient and cross-fade functions, which take any arguments. The optional first
argument of a gradient (direction or shape and position, `<color-interpolation-method>`) is never empty and is followed by a comma, so `linear-gradient(, red, blue)` is invalid. A colour-stop list is a stop, then `, [hint ,]? stop` any number
of times; a stop is a colour with up to two positions, a hint one position, and a conic gradient takes angles or percentages where the others take lengths or percentages. A `<radial-geometry>` is a shape and a size in either order, then `at <position>`:
a `circle` takes one non-negative length or an extent keyword, an `ellipse` two non-negative length-percentages or one or two extent keywords, and with no shape one length means a circle and two length-percentages an ellipse.
`light-dark()` as a colour and as an image are told apart by their arguments. `cursor` takes `<url>`, `image-set()` and `light-dark()` of those. `ValueKinds.Image` (used by the shorthands and the typed `background-image`) asks this grammar, so a gradient with bad arguments is no longer an image.
A range written on a type, such as `<percentage [0,100]>`, now bounds literal numbers and percentages from above as well as from below (math functions are clamped, not rejected).
`light-dark()` is no longer taken as a possible `<url>` or `<string>`.

A type the matcher has no definition for (`<position>`, `<inset-value>`, ...) matches one component value and the answer is "unknown", which stays
supported unless the value cannot match anyway. So a gap here can accept an invalid value but never rejects a valid one. The rules that keep it sound:

- `<'property'>` expands to that property's whole value definition (to a depth of 16), so it can match several component values (`border-image`'s
  `<'border-image-slice'>` in `1 1`).
- `<custom-ident>` is an identifier that is not a CSS-wide keyword or `default`; `<dashed-ident>` one that starts with `--`; `<ident>` any identifier.
  Where a property's prose excludes more (`none` in `container-name`), the grammar still accepts it.
- A value containing an arbitrary substitution function (`attr()`, `env()`, `if()`, `first-valid()`, `inherit()`, `toggle()`, `random()`,
  `random-item()`, `sibling-index()`, `sibling-count()`; CSS Values 5) anywhere, at any depth, is "unknown" for the matcher, and `IsSupported` accepts it when it is
  otherwise well formed (no stray brackets, strings or semicolons), for shorthands too.
- Where a length, number or similar type refuses a function the type checks do not model (`calc-size()`, `anchor()`, `anchor-size()`, `mix()`,
  `progress()`, `light-dark()`, `contrast-color()`, vendor-prefixed functions), the answer is "unknown".
- A value of more than 2,048 component values, or a search of more than 400,000 steps, is "unknown" too.

`GrammarSoundnessTests` checks the rule over every style sheet, `<style>` element and `style` attribute under `testdata` (and `ONEHTML_SOUNDNESS_DIR` when
set): every declaration the cascade's parse-time check keeps must be supported. Over 3,380 files and 7,000 declarations, 6,855 are kept by the cascade check and
exactly one is rejected: `margin-trim: block-start block()`, which CSS Box 4 makes invalid (`block()` is not a keyword; the file is a test that expects it to be
dropped) and which the cascade keeps only because its check is looser.

The cascade's own parse-time check (`ParsedDeclaration.IsValidLonghand`) stays as it was and does not use the matcher, so which declarations a style sheet drops
is unchanged. Moving it onto the matcher would also drop declarations like the `margin-trim` one above, correctly, but the evidence for it is the `testdata`
run only (the larger corpus was not available for this change), so it waits for a run over that corpus.

## 4. calc() simplification

CSS Values 4 section 10.10 and 10.13. `SpecifiedValueText.Serialize(values)` writes a specified value with each math function simplified at any depth:
`calc(1px + 2PX)` is `calc(3px)`, `calc(1px+2px)` (invalid) is left as written, everything outside a math function is copied from the source. Terms
of a sum are written in the order section 10.13 gives, so `calc(10px + 2em)` is `calc(2em + 10px)`.

`ComputedStyle.GetComputedValue` computes a value that is one math function of the length type and has no percentage to px (font-relative units
against the element's own font size): `width: calc(1px + 2PX)` is `3px`, `margin-left: calc(1em + 1px)` at 20px is `21px`. With a percentage it is
the simplified `calc(...)`. Properties with typed parsers (`top`, `font-size`, ...) were already doing this.

A math function whose value reads the environment is accepted by the typed `font-weight` and `font-style` parsers and resolved with the default `LengthContext` (a container-query unit with no container is the small
viewport, Containment 3 section 4.1; with no viewport set it is 0): `font-weight: calc(100 + (sign(20cqw - 10px) * 5))` and `font-style: oblique calc(30deg + (sign(2cqw - 10px) * 5deg))` are valid. Only a written angle outside
-90deg to 90deg is invalid for `oblique`; a math result is clamped to that range (Fonts 4 section 2.3), and a math weight is clamped to 1 to 1000 when read (Values 4 section 10.1).

## 5. Platform defaults

- **Colors.** A system color computes to its sRGB value (`color: CanvasText` is `rgb(0, 0, 0)`, `Canvas` is `rgb(255, 255, 255)`), so the initial
  `color` reads `rgb(0, 0, 0)` as in Chrome. `ComputedStyle.Color` and `CssColor.SystemName` are unchanged; `GetComputedValue` for `color`,
  `background-color` and `outline-color` resolves the name. The light-scheme values are the library's documented choice (`ColorMath`).
- **Font family.** The initial value of `font-family` is "depends on user agent" (CSS Fonts 4 section 2.1). `StyleContext.DefaultFontFamily` is what
  `GetComputedValue("font-family")` reads when no declaration sets it: `"Times New Roman"` (quotes included) by default, which headless Chrome on Linux reports;
  a host with other platform fonts sets its own text. `GetValue` and `FontFamily` still read as unset. Changing it makes `WithContext` build new styles.

## 6. Registered custom properties

CSS Properties and Values API 1, sections 2 to 5.

- **Registration.** `StyleContext.WithRegisteredProperties(IEnumerable<(string Name, string Syntax, bool Inherits, string? InitialValue)>)` (also
  `RegisteredProperty.Create` / `TryCreate`, and `StyleContext.RegisteredProperties`) is `CSS.registerProperty`; an `@property` rule is the same thing
  from a style sheet. Of two `@property` rules for one name the last in the sheets' order wins. A registration made through the context
  replaces an `@property` rule of the same name. An invalid registration throws `ArgumentException` (the API) or is dropped (the rule: it needs a
  name starting `--`, a string `syntax`, `inherits: true | false`, and an `initial-value` unless the syntax is `*`).
- **Syntax.** `*`, or `|`-separated alternatives, each a component name (`<length>`, `<number>`, `<percentage>`, `<length-percentage>`,
  `<color>`, `<image>`, `<url>`, `<integer>`, `<angle>`, `<time>`, `<resolution>`, `<transform-function>`, `<transform-list>`, `<custom-ident>`,
  `<string>`) with an optional `+` (space-separated list) or `#` (comma-separated list), or a keyword (an identifier, with CSS escapes, compared
  case-sensitively; never a CSS-wide keyword or `default`). Whitespace around alternatives is ignored. All 236 literal calls of the WPT file
  `register-property-syntax-parsing.html` pass.
- **Initial value.** Required unless the syntax is `*`; it must match and be computationally independent: no `var()`, no font-relative or container
  units, no `currentcolor`, no CSS-wide keyword. Viewport units are allowed and follow the viewport of the context the styles are made for.
- **Computed value** (typed by the syntax): a length is `Npx` (font-relative units resolve against the element's own font size, read from its cascaded
  `font-size` when that is a plain value, else the parent's), a percentage stays `N%`, a calc() with a percentage stays `calc(...)`, `<angle>` is `deg`,
  `<time>` is `s`, `<resolution>` is `dppx`, a color is sRGB (`rgb(...)`; `currentcolor` stays), a list is joined with a space or `, `, other types keep their text.
  A `*` property keeps its substituted text as before.
- **Inheritance and initial.** A registered property that does not inherit is reset to its initial value in every element (and every pseudo-element
  style); one that does inherit starts from the initial value at the root. `initial` gives the initial value, `inherit` on a non-inheriting property
  takes the parent's value. The initial value of a registered property is present on every element, so `getComputedStyle` reads it without a declaration.
- **Invalid at computed-value time.** A value that does not match the syntax once `var()` is substituted, or a `var()` that cannot be substituted, makes
  the property behave as `unset`: the inherited value for an inheriting property, the initial value otherwise.
- **Parse-time drop.** A declaration of a registered property (not `*`) with no `var()` and no CSS-wide keyword whose value does not match the syntax is
  dropped before the cascade (Properties and Values API 1 section 2.2, as Chrome does), so an earlier declaration of the property stands. A declaration
  with `var()` takes part in the cascade and is invalid at computed-value time. The match is by the same typing the computed value uses, against the
  registrations in force for the style computation (the context's and the sheets' `@property` rules), so the same sheet drops different declarations
  under different registrations.
- **`var()` reads computed values.** `var(--a)` where `--a` is registered substitutes `--a`'s computed value, not its specified text: with `font-size: 10px`,
  `--a: 2em` (`<length>`) and `--b: var(--a)` give `--b` as `20px`. A registered property whose substituted value does not match is invalid at
  computed-value time, so a `var()` naming it without a fallback is invalid too, and one with a fallback uses the fallback.
- **Deviations.** A `font-size` written with `var()` of a registered property resolves registered lengths against the parent's font size. Animation of
  registered properties and the `CSSStyleDeclaration` side (`getPropertyValue`, `setProperty`) belong to the host.
- `WithContext` with other registrations (or another `DefaultFontFamily`) builds new styles; interaction overlays are unchanged.

## 7. Web-platform-tests ledger

Pinned commit `ffc4686d117de150daf1287809302e3edea82dc6`. The replayed and mirrored files are fetched by `tools/wpt/fetch_cssom.py` into `testdata/wpt/cssom/`
(SHA-256 in `SHA256SUMS`, unchanged). The `css/css-values` calc files run in the existing `CssWptValueTests` replay (`testdata/css/wpt`).
Failures of the replay are listed with reasons in `testdata/wpt/cssom/expectations.txt`: 236 of 236 syntax calls pass, 24 of 27 selector calls pass, 3 are listed.

Of 436 files in `css/css-properties-values-api/` and `css/cssom/` (support files and `META.yml` aside): 2 replayed, 9 covered by own tests, 425 not translated.

### Replayed

- `css-properties-values-api/register-property-syntax-parsing.html`: replayed file-for-file by `WptCssomTests`
- `cssom/selectorSerialize.html`: replayed by `WptCssomTests` (the calls with literal arguments)

### Behaviour covered by own tests (the file is not replayed)

- `css-properties-values-api/at-property.html`: `@property` parsing and registration: `CssomSupportTests.An_at_property_rule_registers_like_the_api_and_the_api_wins`
- `css-properties-values-api/determine-registration.html`: registration precedence: `An_at_property_rule_registers_like_the_api_and_the_api_wins`
- `css-properties-values-api/invalid-at-computed-value-time.html`: `A_value_made_invalid_by_var_substitution_is_invalid_at_computed_value_time`
- `css-properties-values-api/registered-properties-inheritance.html`: inheritance flag: `A_registered_property_that_does_not_inherit_starts_from_its_initial_value`
- `css-properties-values-api/registered-property-computation.html`: typed computed values: `Computed_values_follow_the_syntax`, `An_inheriting_registered_length_is_computed_against_the_font_of_the_element_that_sets_it`
- `css-properties-values-api/registered-property-initial.html`: initial values: `A_registered_property_that_does_not_inherit_starts_from_its_initial_value`, `A_registered_property_takes_its_initial_value_on_the_root_and_when_a_value_does_not_match`
- `cssom/CSS-supports.html`: `Declaration_support_checks_the_value_against_the_property_syntax`
- `cssom/HTMLLinkElement-disabled-001.html`: `A_disabled_sheet_does_not_apply_and_adds_no_attribute`
- `cssom/css-rule-selector-text.html`: `Selector_text_in_an_html_document_lowercases_names_but_not_classes`

### Not translated: bindings (273 files)

Script object model (`CSSStyleSheet`, `CSSRule`, `CSSStyleDeclaration`, `registerProperty` exceptions, `StyleSheetList`...): JavaScript-only behaviour, written by the host runtime over the sheet, selector, declaration and registration APIs.

`pvapi/at-property-cssom.html`, `pvapi/at-property-optional-initial-value.html`, `pvapi/at-property-shadow.html`, `pvapi/at-property-stylesheets.html`, `pvapi/at-property-viewport-units-dynamic.html`, `pvapi/at-property-viewport-units.html`, `pvapi/conditional-rules.html`, `pvapi/font-property-unit-cycles.tentative.html`, `pvapi/get-computed-style-enumeration.html`, `pvapi/initial-value-unit-arithmetic.html`, `pvapi/non-computed-unit-cycles.html`, `pvapi/property-cascade.html`, `pvapi/register-property-sign-mixed-lengths.html`, `pvapi/register-property.html`, `pvapi/registered-property-change-style-001.html`, `pvapi/registered-property-crosstalk.html`, `pvapi/registered-property-cssom.html`, `pvapi/registered-property-dependency-through-fallback.html`, `pvapi/registered-property-ident-function.html`, `pvapi/registered-property-revert.html`, `pvapi/resolved-color-value.html`, `pvapi/self-utils.html`, `pvapi/unit-cycles.html`, `pvapi/url-resolution.html`, `pvapi/var-reference-registered-properties-002.html`, `pvapi/var-reference-registered-properties-cycles.html`, `pvapi/var-reference-registered-properties.html`, `pvapi/var-reference-unit-cycles.html`, `CSS-escape-numeric-id.html`, `CSS-namespace-object-class-string.html`, `CSSConditionRule-conditionText.html`, `CSSContainerRule.tentative.html`, `CSSCounterStyleRule.html`, `CSSFontFaceRule.html`, `CSSFontFeatureValuesRule.html`, `CSSGroupingRule-cssRules.html`, `CSSGroupingRule-insertRule-computed.html`, `CSSGroupingRule-insertRule.html`, `CSSImportRule-insertRule-styleSheet-parentStyleSheet.html`, `CSSImportRule-layer-false-positive.html`, `CSSImportRule-layer-media.html`, `CSSImportRule-media-identity.html`, `CSSKeyframeRule-keyText-edge-cases.html`, `CSSKeyframeRule-keyText.html`, `CSSKeyframeRule.html`, `CSSKeyframesRule-appendRule-invalid.html`, `CSSKeyframesRule-appendRule-multiple.html`, `CSSKeyframesRule-deleteRule-detach.html`, `CSSKeyframesRule-indexed-getter.html`, `CSSKeyframesRule.html`, `CSSNamespaceRule.html`, `CSSRule-type.html`, `CSSRuleList.html`, `CSSStyleDeclaration-indexed-properties.html`, `CSSStyleDeclaration-iterator.html`, `CSSStyleRule-selectorText-setter.html`, `CSSStyleRule-set-selectorText-namespace.html`, `CSSStyleRule-set-selectorText.html`, `CSSStyleRule.html`, `CSSStyleSheet-constructable-baseURL.html`, `CSSStyleSheet-constructable-cssRules.html`, `CSSStyleSheet-constructable-disabled-regular-sheet-insertion.html`, `CSSStyleSheet-constructable-disallow-import.tentative.html`, `CSSStyleSheet-constructable-duplicate.html`, `CSSStyleSheet-constructable-invalidation.html`, `CSSStyleSheet-constructable-replace-cssRules.html`, `CSSStyleSheet-constructable-replace-on-regular-sheet.html`, `CSSStyleSheet-constructable-replace-thenable.html`, `CSSStyleSheet-constructable-replaceSync-detached.html`, `CSSStyleSheet-constructable.html`, `CSSStyleSheet-insertRule-computed.html`, `CSSStyleSheet-modify-after-removal.html`, `CSSStyleSheet-replace-detach-old-rules.html`, `CSSStyleSheet-replace-parse-errors.html`, `CSSStyleSheet-template-adoption.html`, `CSSStyleSheet.html`, `HTMLLinkElement-disabled-002.html`, `HTMLLinkElement-disabled-003.html`, `HTMLLinkElement-disabled-004.html`, `HTMLLinkElement-disabled-005.html`, `HTMLLinkElement-disabled-006.html`, `HTMLLinkElement-disabled-007.html`, `MediaList-parsing.html`, `MediaList.html`, `MediaList2.xhtml`, `StyleSheet-properties.html`, `StyleSheetList-constructable-shadow-with-style-recalc.html`, `StyleSheetList-constructable-shadow.html`, `StyleSheetList-constructable-with-style-recalc.html`, `StyleSheetList-constructable.html`, `StyleSheetList.html`, `adoptedstylesheets-cascade-order.html`, `adoptedstylesheets-modify-array-and-sheet.html`, `adoptedstylesheets-observablearray-removal.html`, `adoptedstylesheets-observablearray.html`, `at-namespace.html`, `base-uri.html`, `border-shorthand-serialization.html`, `computed-style-001.html`, `computed-style-002.html`, `computed-style-003.html`, `computed-style-004.html`, `computed-style-005.html`, `computed-style-set-property.html`, `css-style-attr-decl-block.html`, `css-style-attribute-modifications.html`, `css-style-declaration-modifications.html`, `css-style-reparse.html`, `cssimportrule-parent.html`, `cssimportrule-sheet-identity.html`, `cssimportrule.html`, `cssom-cssText-serialize.html`, `cssom-cssstyledeclaration-set.html`, `cssom-fontfacerule-constructors.html`, `cssom-fontfacerule.html`, `cssom-getPropertyValue-common-checks.html`, `cssom-pagerule.html`, `cssom-ruleTypeAndOrder.html`, `cssom-setProperty-shorthand.html`, `cssstyledeclaration-all-shorthand.html`, `cssstyledeclaration-cssfontrule.tentative.html`, `cssstyledeclaration-csstext-all-shorthand.html`, `cssstyledeclaration-csstext-final-delimiter.html`, `cssstyledeclaration-csstext-important.html`, `cssstyledeclaration-csstext-setter.window.js`, `cssstyledeclaration-csstext.html`, `cssstyledeclaration-custom-properties.html`, `cssstyledeclaration-mutability.html`, `cssstyledeclaration-nested.html`, `cssstyledeclaration-properties.html`, `cssstyledeclaration-registered-custom-properties.html`, `cssstyledeclaration-removeProperty-all.html`, `cssstyledeclaration-setter-attr.html`, `cssstyledeclaration-setter-declarations.html`, `cssstyledeclaration-setter-form-controls.html`, `cssstyledeclaration-setter-logical.html`, `delete-namespace-rule-when-child-rule-exists.html`, `escape.html`, `flex-serialization.html`, `font-family-serialization-001.html`, `font-shorthand-serialization.html`, `font-variant-shorthand-serialization.html`, `functional-values-comma.html`, `getComputedStyle-basic.html`, `getComputedStyle-calc.html`, `getComputedStyle-detached-subtree.html`, `getComputedStyle-display-none-001.html`, `getComputedStyle-display-none-002.html`, `getComputedStyle-display-none-003.html`, `getComputedStyle-display-none-shadow-invalidation.html`, `getComputedStyle-dynamic-subdoc.html`, `getComputedStyle-getter-v-properties.tentative.html`, `getComputedStyle-important.html`, `getComputedStyle-inset-inline-containing-block-vertical.html`, `getComputedStyle-insets-absolute-roundtrip.html`, `getComputedStyle-insets-absolute.html`, `getComputedStyle-insets-fixed.html`, `getComputedStyle-insets-grid.html`, `getComputedStyle-insets-nobox.html`, `getComputedStyle-insets-relative.html`, `getComputedStyle-insets-relpos-inline.html`, `getComputedStyle-insets-static.html`, `getComputedStyle-insets-sticky-container-for-abspos.html`, `getComputedStyle-insets-sticky.html`, `getComputedStyle-layout-dependent-removed-ib-sibling.html`, `getComputedStyle-layout-dependent-replaced-into-ib-split.html`, `getComputedStyle-line-height.html`, `getComputedStyle-live.html`, `getComputedStyle-logical-enumeration.html`, `getComputedStyle-margins-roundtrip.html`, `getComputedStyle-math-function-percentage.html`, `getComputedStyle-mutations.html`, `getComputedStyle-page-rule.xhtml`, `getComputedStyle-pointerEvents.html`, `getComputedStyle-property-order.html`, `getComputedStyle-pseudo-checkmark.html`, `getComputedStyle-pseudo-class.html`, `getComputedStyle-pseudo-picker-icon.html`, `getComputedStyle-pseudo-picker.html`, `getComputedStyle-pseudo-shadow.html`, `getComputedStyle-pseudo-with-argument.html`, `getComputedStyle-pseudo.html`, `getComputedStyle-resolved-colors.html`, `getComputedStyle-resolved-min-max-clamping.html`, `getComputedStyle-resolved-min-size-auto.html`, `getComputedStyle-root-variables.html`, `getComputedStyle-root.html`, `getComputedStyle-shadow-host.html`, `getComputedStyle-shadow-inherit.html`, `getComputedStyle-sticky-pos-percent.html`, `getComputedStyle-style-element-updates.html`, `getComputedStyle-visibility-nominal-case.html`, `getComputedStyle-visibility-override.html`, `getComputedStyle-visibility-unset.html`, `getComputedStyle-width-scroll.tentative.html`, `grouping-rule-no-nested-declarations.html`, `historical.html`, `import-namespace-invalid-prelude.html`, `inline-style-001.html`, `insertRule-across-context.html`, `insertRule-charset-no-index.html`, `insertRule-font-face.html`, `insertRule-import-no-index.html`, `insertRule-namespace-after-import.html`, `insertRule-namespace-no-index.html`, `insertRule-no-index.html`, `insertRule-syntax-error-01.html`, `invalid-pseudo-elements.html`, `link-element-stylesheet-title.html`, `medialist-appendmedium-parse-single-and-dedup.html`, `medialist-deletemedium-parse-and-remove-all.html`, `medialist-interfaces-001.html`, `medialist-interfaces-002.html`, `medialist-interfaces-004.html`, `medialist-mutation-after-owner-gc.html`, `mediaquery-sort-dedup.html`, `nested-import-namespace-invalid.html`, `overflow-serialization.html`, `page-descriptors.html`, `preferred-stylesheet-order.html`, `preferred-stylesheet-reversed-order.html`, `property-accessors.html`, `resolved-border-width.html`, `rule-restrictions.html`, `selectorText-modification-restyle-002.html`, `serialization-CSSDeclaration-with-important.html`, `serialize-all-longhands.html`, `serialize-custom-props.html`, `serialize-media-rule.html`, `serialize-namespaced-type-selectors.html`, `serialize-values.html`, `serialize-variable-reference.html`, `serialize-whitespace.html`, `set-selector-text-attachment.html`, `setproperty-custom-property-override-important.html`, `setproperty-null-undefined.html`, `shadow-dom-style-sheet.html`, `shorthand-serialization.html`, `shorthand-values.html`, `style-attr-stray-braces.tentative.html`, `style-attr-update-across-documents.html`, `style-background-position-longhands.html`, `style-background-position.html`, `style-background-repeat.html`, `style-background-shorthand-overwrite.html`, `style-backgroundcolor-oklch.html`, `style-backgroundcolor-table-row.html`, `style-backgroundimage-lineargradient.html`, `style-border-shorthand-var.html`, `style-color-values.html`, `style-color.html`, `style-cssText-mutations.html`, `style-element-inline-important.html`, `style-element-insertion-removal-computed.html`, `style-font-shorthand.html`, `style-global-variable.html`, `style-set-cssText.html`, `style-set-custom-property-priority.html`, `style-set-custom-property.html`, `style-set-property.html`, `style-sheet-interfaces-001.html`, `style-sheet-interfaces-002.html`, `style-width-calc-vh-vw.html`, `stylesheet-same-origin.css`, `stylesheet-same-origin.sub.html`, `stylesheet-title.html`, `system-color-inherit.html`, `system-color-lowercase.html`, `ttwf-cssom-doc-ext-load-count.html`, `ttwf-cssom-doc-ext-load-tree-order.html`, `ttwf-cssom-document-extension.html`, `variable-names.html`, `xml-stylesheet-pi-in-doctype.xhtml`

### Not translated: reftest (31 files)

Rendering reference tests: they compare painted output, which the library does not produce. The cascade facts they rely on are covered by the tests above.

`pvapi/registered-property-change-style-002-ref.html`, `pvapi/registered-property-change-style-002.html`, `pvapi/registered-property-computation-color-001-ref.html`, `pvapi/registered-property-computation-color-001.html`, `pvapi/registered-property-computation-color-002.html`, `pvapi/registered-property-computation-color-003-ref.html`, `pvapi/registered-property-computation-color-003.html`, `pvapi/registered-property-computation-color-004.html`, `pvapi/registered-property-computation-color-005.html`, `pvapi/registered-property-computation-color-006.html`, `CSSStyleSheet-constructable-concat-ref.html`, `CSSStyleSheet-constructable-concat.html`, `CSSStyleSheet-constructable-insertRule-base-uri-ref.html`, `CSSStyleSheet-constructable-insertRule-base-uri.html`, `HTMLLinkElement-disabled-alternate-ref.html`, `HTMLLinkElement-disabled-alternate.html`, `adoptedstylesheets-adopt-link.tentative.html`, `adoptedstylesheets-adopt-style-subresource.tentative.html`, `adoptedstylesheets-adopt-style.tentative.html`, `all-initial-csstext-ref.html`, `all-initial-csstext.html`, `insertRule-from-script-ref.html`, `insertRule-from-script.html`, `medialist-dynamic-001-ref.html`, `medialist-dynamic-001.html`, `selectorText-modification-restyle-001-ref.html`, `selectorText-modification-restyle-001.html`, `style-attr-clone-ref.html`, `style-attr-clone.html`, `stylesheet-replacedata-dynamic-ref.html`, `stylesheet-replacedata-dynamic.html`

### Not translated: anim (77 files)

Animation, Typed OM and IDL conformance: needs the script runtime or an animation engine.

`pvapi/animate-invalid.html`, `pvapi/animation/custom-property-animation-angle-comma-list.html`, `pvapi/animation/custom-property-animation-angle-space-list.html`, `pvapi/animation/custom-property-animation-angle.html`, `pvapi/animation/custom-property-animation-color-comma-list.html`, `pvapi/animation/custom-property-animation-color-space-list.html`, `pvapi/animation/custom-property-animation-color.html`, `pvapi/animation/custom-property-animation-custom-ident.html`, `pvapi/animation/custom-property-animation-image.html`, `pvapi/animation/custom-property-animation-inherited-used-by-standard-property.html`, `pvapi/animation/custom-property-animation-integer-comma-list.html`, `pvapi/animation/custom-property-animation-integer-space-list.html`, `pvapi/animation/custom-property-animation-integer.html`, `pvapi/animation/custom-property-animation-length-comma-list.html`, `pvapi/animation/custom-property-animation-length-percentage-comma-list.html`, `pvapi/animation/custom-property-animation-length-percentage-space-list.html`, `pvapi/animation/custom-property-animation-length-percentage.html`, `pvapi/animation/custom-property-animation-length-space-list.html`, `pvapi/animation/custom-property-animation-length.html`, `pvapi/animation/custom-property-animation-list-type-mismatch.html`, `pvapi/animation/custom-property-animation-non-inherited-used-by-standard-property.html`, `pvapi/animation/custom-property-animation-number-comma-list.html`, `pvapi/animation/custom-property-animation-number-space-list.html`, `pvapi/animation/custom-property-animation-number.html`, `pvapi/animation/custom-property-animation-percentage-comma-list.html`, `pvapi/animation/custom-property-animation-percentage-space-list.html`, `pvapi/animation/custom-property-animation-percentage.html`, `pvapi/animation/custom-property-animation-resolution-comma-list.html`, `pvapi/animation/custom-property-animation-resolution-space-list.html`, `pvapi/animation/custom-property-animation-resolution.html`, `pvapi/animation/custom-property-animation-time-comma-list.html`, `pvapi/animation/custom-property-animation-time-space-list.html`, `pvapi/animation/custom-property-animation-time.html`, `pvapi/animation/custom-property-animation-transform-function.html`, `pvapi/animation/custom-property-animation-transform-list-multiple-values.html`, `pvapi/animation/custom-property-animation-transform-list-single-values.html`, `pvapi/animation/custom-property-animation-transform-none.tentative.html`, `pvapi/animation/custom-property-animation-url.html`, `pvapi/animation/custom-property-animation-used-in-shorthand.html`, `pvapi/animation/custom-property-animation-with-zoom.html`, `pvapi/animation/custom-property-transition-angle.html`, `pvapi/animation/custom-property-transition-color.html`, `pvapi/animation/custom-property-transition-custom-ident.html`, `pvapi/animation/custom-property-transition-image.html`, `pvapi/animation/custom-property-transition-inherited-used-by-standard-property.html`, `pvapi/animation/custom-property-transition-integer.html`, `pvapi/animation/custom-property-transition-length-percentage.html`, `pvapi/animation/custom-property-transition-length.html`, `pvapi/animation/custom-property-transition-mismatched-inherited-property-numbers.html`, `pvapi/animation/custom-property-transition-mismatched-list.html`, `pvapi/animation/custom-property-transition-mismatched-property-numbers.html`, `pvapi/animation/custom-property-transition-non-inherited-used-by-standard-property.html`, `pvapi/animation/custom-property-transition-number-percentage.html`, `pvapi/animation/custom-property-transition-number.html`, `pvapi/animation/custom-property-transition-percentage.html`, `pvapi/animation/custom-property-transition-property-all.html`, `pvapi/animation/custom-property-transition-resolution.html`, `pvapi/animation/custom-property-transition-time.html`, `pvapi/animation/custom-property-transition-transform-function-box-size.tentative.html`, `pvapi/animation/custom-property-transition-transform-function-matrix.html`, `pvapi/animation/custom-property-transition-transform-function-none.tentative.html`, `pvapi/animation/custom-property-transition-transform-function-to-list.html`, `pvapi/animation/custom-property-transition-transform-function.html`, `pvapi/animation/custom-property-transition-transform-list-box-size.tentative.html`, `pvapi/animation/custom-property-transition-transform-list-matrix.html`, `pvapi/animation/custom-property-transition-transform-list-none.tentative.html`, `pvapi/animation/custom-property-transition-transform-list.html`, `pvapi/animation/custom-property-transition-url.html`, `pvapi/animation/registered-neutral-keyframe.html`, `pvapi/animation/registered-var-to-registered-animating.html`, `pvapi/at-property-animation.html`, `pvapi/at-property-typedom.html`, `pvapi/font-size-animation.html`, `pvapi/idlharness.html`, `pvapi/typedom.html`, `getComputedStyle-animations-replaced-into-ib-split.html`, `idlharness.html`

### Not translated: host (18 files)

Needs events, mutation records, hit testing or a network origin: the host runtime owns these.

`HTMLLinkElement-load-event-002.html`, `HTMLLinkElement-load-event.html`, `HTMLStyleElement-load-event.html`, `MutationObserver-style.html`, `caretPositionFromPoint-audioVideo.html`, `caretPositionFromPoint-in-flex-container.html`, `caretPositionFromPoint-textarea.html`, `caretPositionFromPoint-with-transformation.html`, `caretPositionFromPoint.html`, `caretRangeFromPoint-replace-document.tentative.html`, `caretRangeFromPoint-textarea-transform.tentative.html`, `caretRangeFromPoint.tentative.html`, `cssstyledeclaration-mutationrecord-001.html`, `cssstyledeclaration-mutationrecord-002.html`, `cssstyledeclaration-mutationrecord-003.html`, `cssstyledeclaration-mutationrecord-004.html`, `cssstyledeclaration-mutationrecord-005.html`, `stylesheet-cross-origin-redirect-quirks.sub.html`

### Not translated: crash (26 files)

Crash tests of script and layout paths. The library has no such path; hostile CSS is covered by the limits and fuzz targets.

`pvapi/at-property-non-matching-media-crash.html`, `pvapi/crashtests/computed-property-universal-syntax.html`, `pvapi/crashtests/consume-color-contrast-crash.html`, `pvapi/crashtests/initial-in-audio-crash.html`, `pvapi/crashtests/transition-to-none-crash-001.html`, `pvapi/crashtests/transition-to-none-crash-002.html`, `pvapi/registered-property-parse-crash.html`, `CSSRuleList-appendRule-keyframe-001-crash.html`, `CSSRuleList-appendRule-keyframe-002-crash.html`, `adoptedstylesheets-invalid-assignment-crash.html`, `change-rule-with-layers-crash.html`, `declaration-block-all-crash.html`, `getComputedStyle-in-unrendered-subframe-with-query-container-crash.html`, `getComputedStyle-insets-absolute-crash.html`, `getComputedStyle-insets-absolute-logical-crash.html`, `getComputedStyle-insets-multicol-absolute-crash.html`, `getComputedStyle-special-chars-crash.html`, `insert-dir-rule-crash.html`, `insert-dir-rule-in-iframe-crash.html`, `insert-invalid-where-rule-crash.html`, `insertRule-import-no-sheet-crash.html`, `insertRule-import-trailing-garbage-crash.html`, `insertRule-page-detached-grouping-rule-crash.html`, `removerule-invalidation-crash.html`, `set-selector-text-detached-rule-delete-crash.html`, `set-selector-text-detached-rule-replace-crash.html`
