I'm currently using NativeWind for a React Native project and I am having some issues with custom colors rendering in the project. NativeWind is built on top of TailwindCSS so I think the issue is the same as in TailwindCSS.
I have some custom colors in the tailwind.config.js file and most of them render fine in the codebase. However, certain ones don't render.
tailwind.config.js
module.exports = {
content: [
"./App.{js,jsx,ts,tsx}",
"./src/screens/**/*.{js,jsx,ts,tsx}",
"./src/components/**/*.{js,jsx,ts,tsx}",
"./src/components/MapComponents/**/*.{js,jsx,ts,tsx}",
"./src/assets/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {
fontSize: {
xs: "11px",
sm: "12px",
base: "15px",
lg: "18px",
xl: "20px",
"2xl": "26px",
"3xl": "32px",
},
colors: {
gray: {
base: "#e5e7eb",
dark: "#69686D",
},
blue: {
accent: "#0085ff",
dark: "#5a49d9",
},
red: {
base: "#FF0000",
},
food: {
inner: "#ffc0c1",
outer: "#ff6665",
},
deal: {
inner: "#7ba8cc",
outer: "#277bc0",
},
challenge: {
inner: "#cfc0fe",
outer: "#7446ae",
},
event: {
inner: "#f09b72",
outer: "#ea047e",
},
music: {
inner: "#76ba99",
outer: "#00ffab",
},
sport: {
inner: "#F87070",
outer: "#FE3E3E",
},
outdoors: {
inner: "#4ABE21",
outer: "#49AC26",
},
business: {
inner: "#DEEE2B",
outer: "#CEDD26",
},
},
},
},
plugins: [],
};
Rendering a View container with bg-blue-accent, it renders the background color of that View to the associated custom color. However, bg-food-outer does not work for some reason. Along with others like deal, challenge, music, etc. I also have the tailwind extension from vscode that shows the css code for the tailwindstyle and in the code base when I type bg-food-outer, it shows the right css color.
I tried doing expo start -c to clear the cache but that doesn't seem to work either. How can I render the rest of the custom colors?