fix(sidebar): suppress native details marker (double caret)#1
Merged
Conversation
Sidebar group headers showed TWO carets stacked — daisyUI's own rotating chevron (li>details>summary::after) plus the browser's native <details> disclosure marker, which doesn't rotate. daisyUI only hides the legacy ::-webkit-details-marker; modern browsers (and iOS Safari, where this was reported) still draw the marker. Add a MARKER_RESET class set to every nav <summary>: list-none + [&::-webkit-details-marker]:hidden + [&::marker]:content-none — covering the list-item marker and both the legacy and standard marker pseudo-elements. Now only daisyUI's single rotating chevron shows, swapping on open/close. Verified: all 3 rendered summaries carry the reset; the arbitrary variants compile to real CSS rules; headings still render. Root cause is docs-kit's Sidebar (the daisyui gem ships no CSS), not the daisyui gem.
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.
Summary
Sidebar group headers (
Overview,REST API, …) rendered two carets stacked— daisyUI's own rotating chevron (
li>details>summary::after) plus thebrowser's native
<details>disclosure marker, which doesn't rotate. So insteadof one caret swapping on open/close, you saw a ▼ and a ▲ on top of each other
(reported on iOS Safari).
Root cause: daisyUI only hides the legacy
::-webkit-details-marker; modernbrowsers (and Safari) also draw the standard
::marker/ list-item marker, whichdocs-kit's
DocsUI::Sidebarsummaries didn't suppress. This is a docs-kit issue,not the daisyui gem (the gem ships no CSS).
Fix: every nav
<summary>now carries a marker-reset class set —list-none [&::-webkit-details-marker]:hidden [&::marker]:content-none— coveringthe list-item marker plus both the legacy and standard marker pseudo-elements.
Only daisyUI's single rotating chevron remains.
Verification
::marker{content:none},::-webkit-details-marker{display:none}).bundle exec rspec— 49 green;bundle exec rubocop— clean.