refactor(core): replace non-specific CSS selectors with explicit classes - #3460
orrgottlieb wants to merge 1 commit into
Conversation
Tighten two low-specificity selector patterns found in an audit:
- Slider: replace `.disabled * { pointer-events: none }` (universal
descendant) with a `.railDisabled` marker class on SliderRail. The
rail's subtree is disabled via inherited pointer-events while the root
keeps its `not-allowed` cursor. No behavior change.
- MultiSelectedValues: replace bare `> div:first-child` and
`> div:not(.hiddenChip)` with the existing `.chipWrapperWithOverflow`
and `.inputAndCounterWrapper` classes. Behavior-equivalent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR Summary by QodoRefactor core CSS selectors to target explicit classes in Slider and Dropdown
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
|
📦 Bundle Size Analysis ✅ No bundle size changes detected. Unchanged Components
📊 Summary:
|
What
Follow-up to the Toggle focus-selector cleanup. Replaces two low-specificity selector patterns (found in a repo-wide audit) with explicit class targets. Behavior-preserving.
Changes
Slider —
.disabled * { pointer-events: none }(universal descendant) → a.railDisabledmarker class applied toSliderRail. Sincepointer-eventsis inherited, disabling the rail disables its whole subtree, while the.disabledroot keepscursor: not-allowed. Same visual/interaction behavior.MultiSelectedValues — bare
divcombinator targets replaced with existing classes:> div:first-child→> .chipWrapperWithOverflow:first-child> div:not(.hiddenChip)→> .chipWrapperWithOverflow:not(.hiddenChip), > .inputAndCounterWrapper(exactly the set the old selector matched: visible chips + the input/counter wrapper)Deliberately left unchanged
TextField.textField * { box-sizing: border-box }— an idiomatic scoped reset;box-sizingisn't inherited so it can't move to the parent, and enumerating descendants would be more fragile.div { max-width: 100% }in MultiSelectedValues single-chip — targets the externalChipspackage's internals (no exposed class); out of scope.Testing
🤖 Generated with Claude Code