Files
Zachary D. Rowitsch f7f4518e7d Add ::before/::after pseudo-element support with content property
Implement the full pipeline for CSS ::before and ::after pseudo-elements
with string-literal content values. This enables clearfix patterns and
generated content across all layout modes (block, inline, flex, grid).

Changes span 8 crates:
- css: ContentValue enum, PropertyId::Content, parse_content_value()
- selectors: pseudo_element() extraction, matches_ignoring_pseudo_element()
- style: before_styles/after_styles on ComputedStyles, pseudo-element rule
  bucketing and cascade in compute_pseudo_styles()
- layout: build_pseudo_element_box() with synthetic NodeIds, shared
  apply_computed_styles_to_box() to deduplicate property copying
- dom: node_count() for synthetic NodeId allocation

Key design decisions:
- content: "" generates an empty box (clearfix), only normal/none suppress
- Pseudo-elements default to display: inline per CSS spec
- Replaced elements (img, input, video, etc.) skip pseudo-element computation
- Exhaustive Display match in pseudo-element box type resolution

Promotes 5 WPT tests to pass, demotes 2 false passes to known_fail.
Includes 102 new unit tests across all affected crates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:11:37 -05:00
..