I have a <Section>
component:
const styles = theme => ({
section: {
backgroundColor: theme.colors.primary,
color: theme.colors.white,
'& a:not(.button)': {
color: 'currentColor',
textDecoration: 'underline',
},
},
});
And a <Button>
component:
const styles = theme => ({
button: {
backgroundColor: theme.colors.light,
color: theme.colors.dark,
padding: theme.spacing.default,
},
});
Basically, I'd like to use <Button>
inside of <Section>
and not have its color overridden.
I can't use & a:not($button)
because it's in a different component.
One possible solution I just tested is simply adding
!important
to the<Button>
styles. It feels dirty...