Work log
Published September 22, 2026
2026-09-22 — CSS Research Summary
Frontend Analysis (FA) treats CSS as an independent semantic research domain rather than as a collection of selectors, declarations, and values.
The current CSS research direction focuses on identifying which authored and derived styling facts must remain observable for reliable frontend analysis.
Primary areas of interest include:
- selector semantics
- selector matching
- declarations and property values
- cascade behavior
- specificity
- source ordering
- inheritance
- specified and computed values
- invalid or ignored declarations
- authored source correspondence
- cross-domain interaction with HTML and ECMAScript
A central research concern is the distinction between authored CSS and effective styling behavior.
The stylesheet contains authored evidence such as:
- selectors
- rules
- declarations
- property names
- values
- duplicate declarations
- source ordering
- rule boundaries
but the style ultimately affecting an element may depend on additional semantics such as:
- selector matching
- cascade origin
- importance
- cascade layers
- specificity
- source order
- inheritance
- initial values
- contextual conditions
- invalid or unsupported declarations
Because of this, FA does not assume that CSS can be represented sufficiently as a simple property-value map or generic syntax tree.
The research instead asks which semantic stages need to remain observable and how each result relates back to authored source.
Relevant questions include:
- Which selector matched a particular element?
- Which authored declaration contributed to a styling decision?
- Which competing declarations were considered?
- Why did one declaration become effective while another did not?
- Does declaration or rule order need to remain explicit?
- Are duplicate authored declarations semantically relevant?
- Which values were authored directly?
- Which values were inherited, initialized, or otherwise derived?
- Which semantic facts belong to CSS itself?
- Which facts depend on HTML structure or ECMAScript-driven mutation?
Source correspondence is especially important.
The final computed value alone is not sufficient for many analysis tasks.
FA aims to preserve enough provenance to explain:
- where a styling fact originated
- which authored rule or declaration contributed
- which selector participated
- which semantic process transformed the authored value
- why alternative authored candidates did not become effective
The current research model also keeps cross-domain ownership explicit.
HTML owns document structure and authored markup.
CSS owns stylesheet and styling semantics.
ECMAScript may mutate classes, attributes, inline styles, DOM structure, custom properties, or stylesheet state.
These interactions should be modeled as explicit boundaries between domains rather than collapsing HTML, CSS, and ECMAScript into one representation.
The intended research workflow remains falsification-first:
CSS authority → bounded semantic question → independent observation or oracle → positive and negative witnesses → attempted falsification → accepted evidence → production representation
No broad CSS representation should be frozen merely because it resembles an existing CSS parser, CSSOM model, or AST architecture.
Production representation should instead follow demonstrated semantic requirements and consumer needs.
The current objective is therefore not simply to "support CSS."
It is to progressively establish small, evidence-backed CSS capabilities whose semantic meaning, provenance, ownership, and limitations are explicit.
As individual areas such as selector matching, cascade behavior, declaration semantics, inheritance, or computed values accumulate enough evidence, they can be promoted into independent research records.
Until then, this summary serves as the current CSS research baseline.
#CSS #FrontendAnalysis #WebPlatform #StaticAnalysis #Research