-
Notifications
You must be signed in to change notification settings - Fork 294
prose color classes are not working. #118
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
It looks like the classes aren't actually being added, is React removing them for some reason? Try using vanilla HTML to troubleshoot and isolate the problem so you know what the root cause is. |
@adamwathan I updated my code a bit, now I do see the classes on my element, however the styling is not there. Any chance you have experience using this with next.js? |
Yeah it should work, do you have a repo I can look at? |
Having same issue. |
Having the same issue - the generated CSS just doesn't provide any styles, except for
|
Can't help until someone provides a reproduction. |
It seems to only happen when customizing colours in tailwind.config.js. https://github.com/sevenseacat/tailwind-colors-repro
in compiled.css:
Removing the |
In my case I see there is no color prose classes at all in the css. https://nextjs.marcofranssen.nl/_next/static/css/410dc83624a7dd542018.css my tailwind config looks as following. module.exports = {
purge: ["./pages/**/*.js", "./components/**/*.js"],
theme: {
extend: {
colors: {
"accent-1": "#FAFAFA",
"accent-2": "#EAEAEA",
"accent-7": "#333",
success: "#0070f3",
cyan: "#79FFE1",
},
spacing: {
28: "7rem",
},
letterSpacing: {
tighter: "-.04em",
},
lineHeight: {
tight: 1.2,
},
fontSize: {
"5xl": "2.5rem",
"6xl": "2.75rem",
"7xl": "4.5rem",
"8xl": "6.25rem",
},
boxShadow: {
small: "0 5px 10px rgba(0, 0, 0, 0.12)",
medium: "0 8px 30px rgba(0, 0, 0, 0.12)",
},
},
},
plugins: [require("@tailwindcss/typography")],
}; my postcss.config looks like this module.exports = {
plugins: [
"tailwindcss",
"postcss-flexbugs-fixes",
[
"postcss-preset-env",
{
autoprefixer: {
flexbox: "no-2009",
},
stage: 3,
features: {
"custom-properties": false,
},
},
],
],
}; I can now also confirm if I remove the |
Trying to experiment with Tailwind on my own website for fun, I stumbled upon the same issue. I was trying to create a custom color Here's a screencast: screencast.mp4sry for the slow compilation time, changing the tailwind config always takes some time As a reproduction, you can use the following branch: https://github.com/martpie/martpie.io/tree/tailwind-repro
|
Looks like extending theme colors affects generation of |
Worth adding that not using module.exports = {
purge: ['./pages/**/*.tsx', './components/**/*.tsx', './layouts/**/*.tsx'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
colors: { // not using extend for colors
primary: {
600: '#3c7b9f',
900: '#2d4f5d',
},
},
},
variants: {
extend: {},
},
plugins: [require('@tailwindcss/typography')],
}; |
Hey! Thank you for your bug report! There are multiple issues going on in this thread. I will address some of them and close the issue afterwards. If you still have certain issues after you read this, feel free to open a new issues + reproduction case. Preferably using https://play.tailwindcss.com If your
|
Thank you @RobinMalfait ! I oddly could not reproduce it with Tailwind Play (https://play.tailwindcss.com/RehCJ55iWY?file=config) (seems to be working fine), probably due to the color.600 variant existing indeed. I will open a new issue if I can reproduce it. |
I'm not too sure how the Tailwind Play site works, but I'd expect this to work and have a red link? https://play.tailwindcss.com/yRlhEdUVtS It does if I remove the |
I know I'm late but apparently the Tailwind plugin provided on the website doesnt work, I used this cdn instead and it did the trick:
|
Uh oh!
There was an error while loading. Please reload this page.
I have applied
prose prose-blue
on my content. However it doesn't render the links as blue.See here my blog.
https://nextjs-blog-git-feature-blog-posts.marcofranssen.vercel.app/posts/202006-building-a-elasticsearch-cluster-using-docker-compose-and-traefik
This is my code rendering the markdown
In the html it shows as.
My
tailwind.config.js
looks asIs this a bug? Did I miss something?
The text was updated successfully, but these errors were encountered: