Repository navigation
fix: keep collapsible titles clear of the chevron - #461
Conversation
A collapsible block's summary was a flex container with no right padding, and the chevron is absolutely positioned at right: 0, so a title long enough to reach the right edge ran under the chevron. As a flex container, the summary also turned inline code in a title into a flex item, splitting the surrounding words into stacked columns. Lay the summary out as a block, reserve 2rem on the right for the chevron, and center the chevron vertically in both the closed and open states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
doc-bump.css mirrors the doc.css collapsible rules for the detached search overlay, so it still had the flex layout that lets a wrapped title run under the chevron. Apply the same block layout, right padding, and vertically centered chevron there. Also reword the doc.css comment to state the current reason rather than past behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Feediver1
left a comment
There was a problem hiding this comment.
Consider the suggestion from the review
The open-state chevron rules set border-color and border-width, but the chevron is a background image with no border-style, so neither rendered. The doc.css comment now points to the doc-bump.css copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Applied both docs-review suggestions in 58f5ab8:
@Feediver1 Thanks for the review! |
📋 Docs review: ✅ Ready to approveRe-review of the changes since What the last review said: previous report. Not approved automatically: automatic approval is switched off for redpanda-data/docs-ui. Since the last review (at
|

Problem
On collapsible blocks (
[%collapsible], rendered as<details>), a title long enough to reach the right edge runs under the chevron. You can see it in the Check your understanding section of the Agentic Data Plane overview page. Titles of a similar length on other pages look fine only because their line breaks happen to fall just short of the chevron.Cause, in
src/css/doc.css:.doc details > summary.titleisdisplay: flexwith no right padding..doc details > summary::after(the chevron) isposition: absolute; right: 0, so the text flows underneath it.Fix
display: block) and reservepadding-right: 2remfor the chevron.top: 50%; transform: translateY(-50%)), and keep it centered when it rotates on open (translateY(-50%) rotate(90deg)).An open block's bottom padding is unaffected.
details[open] > summary { padding-bottom: 16px }was already overridden by the more specific.doc details > summary.title { padding-bottom: 0 }, so centering on the summary box centers on the title text in both states.The same changes are mirrored in
src/css/doc-bump.css, whose.aa-DetachedOverlaycopy of these rules styles collapsible blocks in the detached search overlay.This applies to every collapsible block on every site that uses the bundle.
Verification
stylelint src/css/doc.css src/css/doc-bump.csspasses.site.css, and took Playwright screenshots of the Check your understanding sections onget-started/adp-overviewandcontrol/budgetsin light and dark themes, with one block open. Before: the overview titles run under the chevron. After: every title wraps before the chevron, and the chevron is vertically centered on its title, closed and open.gulp bundlebuild, and the search overlay visually. Its rules are identical to thedoc.cssrules checked in the screenshots described above, and nothing indoc-bump.cssadds bottom padding to an open summary.🤖 Generated with Claude Code