Work log
Published September 22, 2026
CSS
The CSS research domain of Frontend Analysis focuses on representing stylesheet semantics in a way that preserves the facts required for reliable frontend analysis without reducing CSS to a generic syntax tree.
The objective is not merely to parse selectors, declarations, or values.
Instead, FA investigates which CSS facts need to remain explicit so that downstream analysis can reason about authored rules, selector relationships, declaration behavior, cascade effects, source correspondence, and interactions with HTML and ECMAScript.
Primary research areas include:
- stylesheet and rule structure
- selector semantics
- declaration semantics
- property/value representation
- cascade and precedence
- specificity
- inheritance
- source ordering
- authored source correspondence
- invalid or ignored declarations
- cross-domain interaction with HTML structure
- runtime interaction where ECMAScript mutates classes, styles, attributes, or stylesheet state
A central distinction is maintained between authored CSS and computed or effective styling behavior.
The authored stylesheet contains source-level evidence such as:
- selectors
- declarations
- ordering
- duplicate declarations
- rule boundaries
- source locations
but the style ultimately applied to an element depends on additional semantics such as:
- selector matching
- cascade origin
- importance
- specificity
- source order
- inheritance
- initial values
- invalid declarations
- contextual conditions
Because of this, FA does not assume that a flat map of property names and values is sufficient.
The research instead asks which stages of CSS semantics must remain independently observable and which facts must preserve provenance back to authored source.
The same falsification-first methodology used throughout Frontend Analysis applies:
CSS authority → bounded semantic question → independent observation or oracle → positive and negative witnesses → falsification → accepted evidence → production representation
CSS representations should be widened only when demonstrated consumer needs require additional semantic detail.
Cross-domain behavior should also remain explicit.
HTML owns document structure and authored markup.
CSS owns stylesheet semantics.
When selector matching, class relationships, attributes, inheritance, or computed styling require information from both domains, the interaction should be modeled as a boundary between domains rather than by collapsing them into one representation.
The long-term goal is to provide evidence-backed CSS facts suitable for higher-level frontend analysis, including debugging, refactoring, migration, replacement analysis, visual behavior investigation, and AI-assisted reasoning.
#CSS #FrontendAnalysis #StaticAnalysis #WebPlatform #Research