I'm using Material-UI and JSS to manage my CSS, and I've run into an issue where the styles differ between development and production.
The reason this appears to be - is that the order of the rules in file must be different.
ie. for an element <div class = "foo bar"/>
in development the stylesheet looks like :
.foo {
color: red;
}
.bar {
color: blue;
}
while in production it will look like:
.bar {
color: blue;
}
.foo {
color: red;
}
causing them to look different.
What I'm wondering is if for the .bar
rule I can apply something like color: unset
, to tell CSS - 'Ignore me, let any other rules set this'.
.bar {
color: blue;
}
.foo {
color: red;
}
p.foo {
/*do what here? I want the color to be blue, without explicitly setting it this way*/
}
<p class = "foo bar">
hello world!
</p>