We use the pseudo-classes :has and :is but we need to exploit them as much as possible.
Sometimes we have this kind of code
&:has(input:hover),
&:has(input:active),
&:has(input:focus-visible) {
background-color: transparent;
outline: 0;
box-shadow: none;
}
Which could be simplified to
&:has(input:is(hover, :active, :focus-visible)) {
background-color: transparent;
outline: 0;
box-shadow: none;
}
This would reduce the selectors size in output CSS.
Another improvement could be to merge enclosed selectors into a :is so that the enclosing selector is not repeated for example
.chip-interactive {
svg,
img,
.icon {
//...
}
}
should be
.chip-interactive {
:is(svg, img, .icon) {
//...
}
}
We use the pseudo-classes
:hasand:isbut we need to exploit them as much as possible.Sometimes we have this kind of code
Which could be simplified to
This would reduce the selectors size in output CSS.
Another improvement could be to merge enclosed selectors into a
:isso that the enclosing selector is not repeated for exampleshould be