Re:Styling with Classy CSS (2006)
by hipadev23 on Thursday November 02, 2023 @01:08PM
(#38116710)
I still think it would be nice if CSS natively allowed you to combine classes the way these @extend and @apply operators do
[ Parent
| on HN ]
Re:Styling with Classy CSS (2006)
by jermaustin1 on Thursday November 02, 2023 @03:39PM
(#38118893)
In practice, I never have found much benefit to that. If I need a base class, I will create a base class. .validation-message for instance, then if the validation is a success/error/warning/info, I will write those classes, then my validation message element will have 2 classes on it "validation-message warning"
That way there is no repeated rules like in the final compiled @extend/@apply operations.