How to override a plugin's styling? #13681
-
I want to override Tailwind CSS Typography's styling of all I've added this to my stylesheet which works fine except that some utility classes (e.g. .prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *))::before {
content: "";
}
.prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *))::after {
content: "";
}
:not(pre) > code {
@apply bg-gray-300 font-medium text-red-500 px-2 py-0.5;
} Here's my tailwind.config.js file export default {
content: [
'./resources/**/*.blade.php',
'./resources/**/*.vue',
'./content/**/*.md',
],
theme: {
extend: {
typography: {
},
},
},
plugins: [
require('@tailwindcss/typography'),
],
}; So is there a way to apply this styling after the plugin is imported? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could move your custom CSS into Tailwind configuration or increase the specificity of the selector and then moving it inside As an aside, Adam Wathan, creator of Tailwind advocates avoiding |
Beta Was this translation helpful? Give feedback.
You could move your custom CSS into Tailwind configuration or increase the specificity of the selector and then moving it inside
@layer utilities
.As an aside, Adam Wathan, creator of Tailwind advocates avoiding
@apply
:https://twitter.com/adamwathan/status/1226511611592085504
https://twitter.com/adamwathan/status/1559250403547652097