Skip to content

fix(sidebar): suppress native details marker (double caret)#1

Merged
mhenrixon merged 1 commit into
mainfrom
fix/swap-icons
Jul 2, 2026
Merged

fix(sidebar): suppress native details marker (double caret)#1
mhenrixon merged 1 commit into
mainfrom
fix/swap-icons

Conversation

@mhenrixon

Copy link
Copy Markdown
Owner

Summary

Sidebar group headers (Overview, REST API, …) rendered two carets stacked
— daisyUI's own rotating chevron (li>details>summary::after) plus the
browser's native <details> disclosure marker, which doesn't rotate. So instead
of 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; modern
browsers (and Safari) also draw the standard ::marker / list-item marker, which
docs-kit's DocsUI::Sidebar summaries 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 — covering
the list-item marker plus both the legacy and standard marker pseudo-elements.
Only daisyUI's single rotating chevron remains.

Verification

  • All 3 rendered summaries carry the reset (verified in the booted app).
  • The Tailwind arbitrary variants compile to real CSS rules (::marker{content:none},
    ::-webkit-details-marker{display:none}).
  • Headings still render; collapse behavior unchanged.
  • bundle exec rspec — 49 green; bundle exec rubocop — clean.

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.
@mhenrixon mhenrixon merged commit 5a67bfa into main Jul 2, 2026
@mhenrixon mhenrixon deleted the fix/swap-icons branch July 2, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant