Comments (9)
Hey! Thank you for your issue!
Much appreciated! 🙏
If you want to override the full typography plugin than you can put it directly in the theme.typography
section:
https://play.tailwindcss.com/cIbKOcLoO9?file=config
module.exports = {
theme: {
typography: {
DEFAULT: {
css: {
pre: {
backgroundColor: 'hotpink',
},
},
},
},
},
variants: {},
plugins: [require('@tailwindcss/typography')],
}
Notice that nothing "exists" except for the new styles on the pre
tag.
If you want to keep most of it, but "remove" some of the parts, then you can put the code inside theme.extend.typography
and mark some sections with null
:
https://play.tailwindcss.com/2ZyvC8cj9g?file=config
module.exports = {
theme: {
extend: {
typography: {
DEFAULT: {
css: {
pre: null
},
},
},
},
},
variants: {},
plugins: [require('@tailwindcss/typography')],
}
Notice that everything of the typography styles still exist, except for the pre
related styles.
Hope this helps!
from tailwindcss-typography.
Same issue, for my use case I need to keep the reset on pre
blocks as I'm using prismjs for highlights
from tailwindcss-typography.
why is this still an issue... it's normal css just put
textDecoration: none;
It's not that easy. It is polluting your CSS for no reason with an extra statement that could be avoided.
We would prefer clean code, that contains as little overridden statements as possible 🙃
One: it's pretty easy. and Two: it's in your config so I don't know how it would be polluting your CSS
from tailwindcss-typography.
Same sort of issue for me: I'm using a descendant selector to target children of .prose
, and need to allow some wide and full width components. This is where setting width to 65ch
doesn't work, as larger text such as headings have a wider width. Using .max-w-none
isn't helpful as then I need to override both .prose
and .max-w-none
.
So really I'd just like to set the max-width for prose myself. Thanks.
from tailwindcss-typography.
If you want to keep most of it, but "remove" some of the parts, then you can put the code inside theme.extend.typography and mark some sections with null:
It would be awesome if you put this into the docs. It took me a while to find this issue.
from tailwindcss-typography.
Same sort of issue for me: I'm using a descendant selector to target children of
.prose
, and need to allow some wide and full width components. This is where setting width to65ch
doesn't work, as larger text such as headings have a wider width. Using.max-w-none
isn't helpful as then I need to override both.prose
and.max-w-none
.So really I'd just like to set the max-width for prose myself. Thanks.
@mattradford I set a max-width on the .prose
class with the following:
module.exports = {
typography: {
default: {
css: {
maxWidth: '65ch',
},
},
},
plugins: [
require('@tailwindcss/typography'),
],
}
from tailwindcss-typography.
Hey thanks @StevenGFX, very helpful 👍
from tailwindcss-typography.
why is this still an issue... it's normal css just put textDecoration: none;
from tailwindcss-typography.
why is this still an issue... it's normal css just put
textDecoration: none;
Its not that easy. It is polluting your CSS for no reason with an extra statement that could be avoided.
We would prefer clean code, that contains as little overridden statements as possible 🙃
from tailwindcss-typography.
Related Issues (20)
- Element `m-X` setting will fail when define `prose-size` HOT 1
- Too much space between figcaption and code block (pre) HOT 2
- Slow VSCode HOT 2
- Generated classes do not respect base tailwind.config "important" setting HOT 2
- `not-prose` does not reset `prose-lg` HOT 2
- Bottom margin is not reset for last child when redefined in lg prose HOT 2
- Wrong order of custom utilities and prose with variant HOT 3
- 0.5.10 causes '[class~=not-prose] *)):before' is not a valid selector HOT 5
- Peer dependency invalid version requirement HOT 1
- `prose-code` targets both inline and block code
- Bad DX: [object Object] appearing in CSS when customizing typography
- Unable to change video size using prose-video:{utility} HOT 3
- Does not work on wechat webview HOT 1
- Numbered lists are being cut off HOT 1
- Markdown Rendered Graphs Overflows the Screen HOT 1
- Type error in the config: Binding element 'theme' implicitly has an 'any' type. HOT 1
- Links don't have a default hover state HOT 3
- Prose not formatting markdown tables correctly HOT 1
- The rendered image height is incorrect. HOT 1
- headings modifier does not work HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwindcss-typography.