Background
PR #273 added a Value-form glossary to `docs/CSS_SUPPORT.md` that defines the angle-bracket placeholders (``, ``, ``, etc.) used in per-property tables.
The glossary is hardcoded in `RenderCSSPropertiesMarkdown` (`html/css_props_doc.go`). The placeholders consumed in per-property tables come from each entry's `Values []string` field in `cssProperties` (`html/css_props.go`).
Nothing currently forces the two to stay in sync. A contributor adding a new property whose Values reference a placeholder not in the glossary (e.g. `
`, ``) would silently produce a doc that uses an undefined placeholder.
Suggested fix
A unit test that:
- Walks every `cssProperties` entry and extracts every `<...>` token from each `Values` string.
- Walks the glossary section of `RenderCSSPropertiesMarkdown` output and extracts the defined placeholders.
- Asserts every placeholder used in `Values` is either defined in the glossary OR is a self-explanatory shorthand component (e.g. `` mapping 1:1 onto a sibling property name).
Could also accept an explicit allowlist of "obvious" placeholders to keep the test small.
Scope
Defensive. Surfaced during review of PR #273. Not blocking that PR.
Background
PR #273 added a Value-form glossary to `docs/CSS_SUPPORT.md` that defines the angle-bracket placeholders (``, ``, ``, etc.) used in per-property tables.
The glossary is hardcoded in `RenderCSSPropertiesMarkdown` (`html/css_props_doc.go`). The placeholders consumed in per-property tables come from each entry's `Values []string` field in `cssProperties` (`html/css_props.go`).
Nothing currently forces the two to stay in sync. A contributor adding a new property whose Values reference a placeholder not in the glossary (e.g. `
`, ``) would silently produce a doc that uses an undefined placeholder.
Suggested fix
A unit test that:
Could also accept an explicit allowlist of "obvious" placeholders to keep the test small.
Scope
Defensive. Surfaced during review of PR #273. Not blocking that PR.