fix(sidebar): align subgroup caret with group caret#4
Merged
Conversation
The sub-group summaries carried .menu-title, but daisyUI reserves that for a STATIC (non-<details>) heading — its rotating-caret layout rule targets summary:not(.menu-title). So a .menu-title summary lost the display:grid layout and its chevron dropped below-left of the label, while the top-level group's chevron was right-aligned. Mismatched carets. Per daisyUI's own collapsible-submenu example (and the daisyui gem's CollapsibleSubMenu), a collapsible summary is a PLAIN summary, never .menu-title. Drop .menu-title from the sub-group summary and style it with explicit muted utilities. Now daisyUI's grid layout applies to both levels and every caret right-aligns in the same column. Verified with a desktop screenshot.
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 sub-group carets (
Guide,Actions,Data display) sat below-left ofthe label, while top-level group carets (
DOCS,COMPONENTS) wereright-aligned — inconsistent placement.
Root cause: the sub-group
<summary>carried.menu-title. daisyUI reserves.menu-titlefor a static (non-<details>) heading; its rotating-caret layoutrule targets
summary:not(.menu-title). So a.menu-titlesummary loses thedisplay:gridlayout and its::afterchevron falls to default flow(below-left), instead of right-aligning via
justify-self:flex-end.Confirmed against the authoritative sources: daisyUI's own collapsible-submenu
example and the daisyui gem's
CollapsibleSubMenuboth render a collapsiblesummary as a plain
<summary>, never.menu-title.Fix: drop
.menu-titlefrom the sub-group summary and give it explicit mutedutilities. daisyUI's grid layout now applies to both levels, so every caret
right-aligns in the same column.
Verification
DOCS,Getting started,Referencecarets allright-aligned in one column.
bundle exec rspec— 49 green;bundle exec rubocop— clean.