You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When viewing docs sourced from MDN that have a "Baseline Alerts" box at the top (like CSS/HTML docs), the style formatting of the <details>/<summary> tags could use some improvements.
Observe the collapsed "Baseline" alert box at the top of the page. {State:Closed (▶︎)}.
Note the placement of the Expand/Collapse widget in relation to the "Baseline widely available" heading.
Click the widget to expand the box. {State:Opened (▼︎)}.
Again note the placement of the widget with respect to the "Baseline..." heading text.
Ideally the <details>/<summary> text should be alongside the widget glyph.
Using the F12 DevTools, I see that the actual text is wrapped in an <H2> header tag with no special handling, but <H2> is generally a block element, not inline.
More resources
Here's snippets showing the current layout issues of the Baseline alert boxes...
Default: Closed
Default: Opened
Possible fix
If the following (or equivalent) CSS Style changes were made, it could look and behave much better:
details { padding-left: 10px; }
This adds a small padding buffer next to the widget.
summary > h2 { display: contents; }
This removes the "block" state for <h2> when within a <summary> tag and places the text next to the glyph.
Both display:inline or display:contents works here... I'll let the team decide what's best.
If applied, it would look similar to this...
Proposed: Closed
Proposed: Opened
The text was updated successfully, but these errors were encountered:
Bug report
Overview:
<details>
/<summary>
tags could use some improvements.HTML:<div>
OS information
Steps to reproduce
HTML:<div>
<details>
/<summary>
text should be alongside the widget glyph.<H2>
header tag with no special handling, but<H2>
is generally a block element, not inline.More resources
Here's snippets showing the current layout issues of the Baseline alert boxes...
Possible fix
If the following (or equivalent) CSS Style changes were made, it could look and behave much better:
details { padding-left: 10px; }
summary > h2 { display: contents; }
block
" state for<h2>
when within a<summary>
tag and places the text next to the glyph.display:inline
ordisplay:contents
works here... I'll let the team decide what's best.If applied, it would look similar to this...
The text was updated successfully, but these errors were encountered: