custom color in tailwind config file not being recognized
See original GitHub issueEverything works great on this package. The docs are clear and helpful. I only have one issue. When I add a custom color to tailwind.config.js
it’s not registering. I’ve restarted expo but still doesn’t work. This is my config file for tailwind:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./screens/**/*.{js,ts,jsx,tsx}",
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
colors: {
"regal-blue": "#50d71e", // this part is not working
},
},
},
plugins: [],
};
Do you have any suggestions? It’s running
expo 5.4.11
react-native": "0.68.2
react": "17.0.2
Issue Analytics
- State:
- Created a year ago
- Comments:29 (12 by maintainers)
Top Results From Across the Web
Custom colors in my tailwind.config.js file not showing on page
Just move the colors property under theme property, remove from extend property. Then you will only see your defined colors by tailwind css...
Read more >Tailwind CSS, certain custom colors are not working
I'm trying to use Tailwind custom colors ...
Read more >Customizing Colors - Tailwind CSS
Using custom colors. If you'd like to completely replace the default color palette with your own custom colors, add your colors directly under...
Read more >Customer colours tailwind not working - Laracasts
I have my own color scheme and I can't get it to work. I created it in tailwind.config.js. I've put it both under...
Read more >How to add new colors to tailwind-css and keep the originals ...
Add the below code to your tailwind.config.js file, and now you can customize your color by adding your own color code.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Instead of commenting “same here” can you please share either your
tailwind.config.js
or your repo. This issue should be resolved, so if it’s still occuring then I need more information.This doesn’t appear to be an issue with NativeWind, an unfortunately I do not have the capacity to debug your project.
I would recommend following simple troubleshooting:
Then you can use simple isolation techniques to find your cause.