fix(core/caniuse): mark up browser support groups as a dl - #5282
Open
marcoscaceres wants to merge 2 commits into
Open
fix(core/caniuse): mark up browser support groups as a dl#5282marcoscaceres wants to merge 2 commits into
marcoscaceres wants to merge 2 commits into
Conversation
marcoscaceres
force-pushed
the
fix/4090-caniuse-grid
branch
from
May 14, 2026 15:22
dddb892 to
54a01af
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Reworks Can I Use output with semantic definition-list markup and responsive CSS Grid layout.
Changes:
- Uses
dl/dt/ddmarkup for browser groups. - Moves “More info” onto its own row.
- Updates styles and tests for the new structure.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/core/caniuse.js |
Generates semantic grouped markup. |
src/styles/caniuse.css.js |
Adds responsive grid layout. |
tests/spec/core/caniuse-spec.js |
Updates selectors and expectations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+227
to
+228
| expect(desktop.querySelector(".caniuse-type").textContent).toBe("desktop"); | ||
| expect(mobile.querySelector(".caniuse-type").textContent).toBe("mobile"); |
marcoscaceres
force-pushed
the
fix/4090-caniuse-grid
branch
from
August 18, 2026 07:48
84ad0fe to
c1b79fa
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/styles/caniuse.css.js:87
- The dark-mode label bug described by this PR is still present. Elevating the label above the rule does not change the unchanged
background-color: var(--bg, white)below; because--bgis never defined, dark-mode pages still get a white patch. Use the color-scheme-aware canvas color as the fallback/background.
/* Above the dd's border, so the label's background breaks the rule instead
of the rule striking through the text. */
position: relative;
z-index: 1;
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/styles/caniuse.css.js:62
position: relativewithout a non-autoz-indexdoes not establish a stacking context, so this explanation is incorrect. The label's own positionedz-index: 1is sufficient for painting over the border; otherwise addz-index: 0orisolation: isolatehere if containment is intended.
/* Establish a stacking context so the label can be lifted above the dd's
bottom border. Reversing the visual order does not reverse paint order:
the dd is a later sibling, so its border would paint over the label and
strike the text through. */
position: relative;
src/styles/caniuse.css.js:87
- The dark-mode rendering bug described by this PR remains: the label raised above the rule still gets
background-color: var(--bg, white)below, but--bghas no definition insrc, so dark documents retain a white patch. Use a color-scheme-aware canvas color for the masking background.
/* Above the dd's border, so the label's background breaks the rule instead
of the rule striking through the text. */
position: relative;
z-index: 1;
marcoscaceres
force-pushed
the
fix/4090-caniuse-grid
branch
from
August 18, 2026 07:57
c1b79fa to
2764896
Compare
marcoscaceres
force-pushed
the
fix/4090-caniuse-grid
branch
from
August 18, 2026 08:33
2764896 to
ef9b1cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #4090
The browser support groups were nested
<div>s; they are now a<dl>with a<dt>label and<dd>of browser cells per group, which is what the issue asked for and reads better to assistive technology. The existing flex layout and its legend-on-a-rule look are kept as-is, and on narrow screens the groups stack full width with the "More info" link on its own row.Not switched to CSS grid, despite the issue suggesting it: the flex layout already produced the intended appearance, and several grid rewrites each regressed it (misaligned group labels, the rule striking through the label text, pills scattered across columns). Two rendering bugs found along the way are fixed here too. The "More info" link carried
caniuse-cell, which sets white text with a background gradient built from a variable only defined on the support-level classes, so it rendered white on white; and the group labels usedvar(--bg, white), but--bgis not defined anywhere in ReSpec, so they painted a white patch on dark-mode pages.Written with AI: this change was generated by Claude. Per AI_POLICY.md.