-
Notifications
You must be signed in to change notification settings - Fork 294
Cannot override the colour of ::before li on <ol> lists #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Update
Then both work as the inheritance isn't as specific. However, I am not sure if this is either Intuitive or consistent... Any Thoughts? |
why is this issue still open |
Why do you think it should be closed @benji014628 ? |
because you already found the solution |
It's not a solution to the original issue, it was a work-around that used a difference level of inheritance, but the original problem still exists and depending the use case could still cause an issue. Also there are inconsistencies between how the |
well in order to override a style in your .css file you need to have higher specificity like |
and what are the inconsistencies between |
I am not trying to override my styles but the styles that the typography plugin generates.
It says in the original thread. |
okay I don't really get it when the simplest way to override the styles is like this
|
Hey! Thank you for your bug report! This should work as expected, but since Tailwind 2.0 you have to keep put the overrides inside the Also note that you can't use deeply nested styles like module.exports = {
theme: {
extend: {
typography: (theme) => ({
DEFAULT: {
css: {
'ol > li::before': {
color: theme('colors.pink.500'),
},
'ul > li::before': {
backgroundColor: theme('colors.pink.500'),
},
},
},
}),
},
},
variants: {},
plugins: [require('@tailwindcss/typography')],
} Here is a working example: https://play.tailwindcss.com/u9vl3dKZ85?file=config |
Uh oh!
There was an error while loading. Please reload this page.
I have tried a few approaches to make this work. These are detailed below. But whatever I have tried, it seems to fail with some pre-set inheritance overriding the config.
here is a screenshot of the inheritance overriding:

Here is what I have tried:
<ul>
lists seem to work ONLY if you use the second approach. Again wrapping 'ul > li' fails with inheritance.The text was updated successfully, but these errors were encountered: