My app.css contain this css variable which is used in my css header component and it works well.
:root {
--fs-subtitle-spartan: 1rem;
}
The class that uses it in the header component :
.menu__items {
font-size: var(--fs-subtitle-spartan);
}
But when I want to modify the variable in media queries of my header it doesn’t work.
@media (width < 48em) {
:root {
--fs-subtitle-spartan: 1.5rem;
}
How can I change css variables in media queries of other components ?
It only works if I change the css variable in the media queries of my app.css.