Keith Fetterman
03/15/2024, 2:49 AM@extend .button-secondary:hover;
The Sass compiler error suggested the following change:
@extend .button-secondary, :hover;
What is happening in the compiled CSS when you specify @extends :hover;
? I can not find any documentation about this when you extend a pseudo-class.Chris
03/15/2024, 7:27 PM&:hover {
color: $sc-button-secondary-hover-text-color;
background: $sc-button-secondary-hover-background-color;
border-color: $sc-button-secondary-hover-border-color;
text-decoration: none;
}
Keith Fetterman
03/15/2024, 8:08 PM.open .split-button-toggle {
@extend .button-secondary, :hover;
i.split-button-toggle-icon {
color: $sc-neutral-shade-0;
}
}
I don’t think is the correct. I don’t think the original implementation intended to extend the .button-secondary styles, just the hover styles.
I think what you did is correct and is what the original developers intended. The developer and I came up with a different approach which I think is the same thing, but I haven’t tested it:
%placeholder:hover {
color: $sc-button-secondary-hover-text-color;
background: $sc-button-secondary-hover-background-color;
border-color: $sc-button-secondary-hover-border-color;
text-decoration: none;
}
.open .split-button-toggle {
@extends %placeholder;
}
When I looked at the compiled CSS file, the @extend .button-secondary, :hover;
added a large chunk of css that was associated with .open .split-button-toggle
that I think was created due to the @extends :hover;
Chris
03/15/2024, 8:13 PMKeith Fetterman
03/15/2024, 8:23 PM