Skip to content

Add spec compliance tracking for CSS and HTML - #286

Open
eXpl0it3r wants to merge 148 commits into
masterfrom
spec-compliance
Open

eXpl0it3r wants to merge 148 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'350 sections, none of them left unreviewed:

  • 425 supported
  • 804 partial
  • 258 parsed only
  • 1'080 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'524 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.

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