Skip to content

Add spec compliance tracking for CSS and HTML - #286

Merged
eXpl0it3r merged 150 commits into
masterfrom
spec-compliance
Nov 13, 2026
Merged

eXpl0it3r merged 150 commits into
masterfrom
spec-compliance

Conversation

@eXpl0it3r

@eXpl0it3r eXpl0it3r commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Before fixing and extending more of the 2.0 rendering, I wanted a complete picture of what HTML Renderer actually implements, instead of relying on comments, of which quite a few turned out to be wrong. This PR adds that picture as spec compliance tracking: every section of CSS 2.1, of 79 CSS modules (the CSS Snapshot plus paged media, tables, overflow, generated content and GCPM) and of the HTML Living Standard is listed in Spec/<spec>.yml, with a status and, where something is missing, the gaps. Subsections of an n/a section are covered by it and only listed when they have a status of their own.

At this point in time that's 3'352 sections, none of them left unreviewed:

  • 420 supported
  • 805 partial
  • 260 parsed only
  • 1'084 unsupported
  • 783 n/a

How it fits together:

  • Spec/README.md explains the statuses and conventions
  • [Spec("css21", "box.html#collapsing-margins")] links a test to the section it verifies, a supported or partial section needs at least one
  • Each of the 1'558 gaps is described in the manifest, most have an [Ignore("Gap, see Spec/css21.yml")] test that fails once the ignore is removed
  • SpecComplianceTests fails when the manifests and tests disagree, e.g. an unknown anchor or a partial section without gaps
  • Source/Tools/HtmlRenderer.SpecCompliance runs the same check and writes the report, CI puts the overview table into the summary of the Windows .NET 8 job and uploads the full report as artifact

Production code only changes in comments, they now cite the section and say what the code can't, instead of retelling the spec. The bugs the review found are fixed separately in #274 to #285.

Every spec area is its own commit, so going through it commit by commit is a lot easier than the full diff. As such I'll land this by fast-forwarding master, so the commits stay as they are.

How to test this PR?

CI should succeed. Locally, dotnet run --project Source/Tools/HtmlRenderer.SpecCompliance -- check validates the manifests and -- report --output report.md writes the report.

@eXpl0it3r
eXpl0it3r force-pushed the spec-compliance branch 2 times, most recently from 881aea6 to ade9e0d Compare November 12, 2026 22:07
@eXpl0it3r
eXpl0it3r merged commit 1128ff0 into master Nov 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant