fix(QExpansionItem): switch-toggle-side colors are now correct#18250
fix(QExpansionItem): switch-toggle-side colors are now correct#18250Jadu07 wants to merge 1 commit intoquasarframework:devfrom
Conversation
UI Tests Results 1 files 98 suites 40s ⏱️ Results for commit 7da2387. |
|
Here's the original problem:
The suggested change you made breaks original and switched versions as seen during testing. The original has no solid color and the switched has two bolded. An indentation issue also appears with the change.
If you utilize the PR suggested earlier that covers both scenarios to get the desired results.
|
ebe4834 to
624c541
Compare
When using switch-toggle-side on QExpansionItem with an :icon prop, the icon was turning grey and the expand arrow was turning black — the opposite of the expected behavior (quasarframework#18008). Root cause: QItem.sass applies `color: $grey-7` to all `--side` sections generically. When switchToggleSide is off the arrow's QItemSection uses `side=true`; when switched on it uses `avatar=true`. Swapping those JS props (as attempted in the previous commit) broke layout indentation and min-width because `avatar`/`side` control geometry, not just color. Fix: CSS-only approach using :has() selectors in QExpansionItem.sass: - The avatar section wrapping the toggle icon is forced to $grey-7 (grey) - The side section wrapping a regular icon is forced to inherit color (full) This fixes colors without touching the JS layout props whatsoever, so indentation, min-width, and padding remain correct in all configurations. Closes quasarframework#18008
624c541 to
b91be6c
Compare
|
@IceIsFrozen Thanks for pointing that out! The layout issue happened because the JS props were changed. I’ve reverted the .js changes and pushed a CSS-only fix (QExpansionItem.sass). It swaps the colors using :has() without affecting the layout, so the indentation stays correct. |
|
@rstoenescu @yusufkandemir pls review this pr |



What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
devbranch (orv[X]branch)fix: #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
When using
switch-toggle-sideonQExpansionItemwith an:iconprop, the icon turns grey and the expand arrow turns black — the opposite of expected.The
side/avatarprops on the icon'sQItemSectionwere inverted ingetHeaderChild():This restores the correct colours: icon stays full-colour (
avatar), expand arrow stays secondary/grey (side), regardless of which side they're on.closes #18008