Commit ebe4834
committed
fix(QExpansionItem): switch-toggle-side colors are now correct
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 (#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 #180081 parent eefc703 commit ebe4834
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
0 commit comments