Closed grubersjoe closed 5 years ago
I managed to get my own example working by wrapping the content in additional quotes, as the CSS needs to have the quotes for content to work. So for your example, it should work with
theme.overrideThemeStyles = () => ({
li: {
marginBottom: '0.25rem',
},
'li:before': {
content: "'*'", // <- Notice, double quotes for the js, single for the css
},
});
Thank's for the suggestion. Meanwhile, I think that this kind of functionality is not really in the scope of typography.js. Closing the ticket...
I'm trying to set the CSS pseudo class
:before
of ali
element like this:Unfortunately, this has no effect at all. The
li:before
rule is simply ignored and won't show up in the resulting CSS. I also tried&:before
inside of theli
block, but this doesn't work either.The pseudo elements
:before
and:after
are very useful sometimes and in this case I'd like to style lists globally instead of using a component every time. So I think it would be a good thing to support this.