A less hackey way to override modular CSS in React, Angular, et al:
Add a custom attribute to the body tag (e.g. ), then target any classes you want to override via the attr selector:
// scss
body[cust-theme] {
.component-class {
background: red;
}
}
Add a custom attribute to the body tag (e.g. ), then target any classes you want to override via the attr selector:
// scss
body[cust-theme] {
.component-class {
background: red;
}
}
Comments