Closed oktalk closed 1 year ago
My custom utilities are not working, and throwing errors like: unknown or invalid utility
unknown or invalid utility
Here is my setup:
// tailwind.js import { create } from 'twrnc'; const tw = create(require('../../tailwind.config.js')); export default tw;
// tailwind.config.js module.exports = { content: ["*.{js,jsx,ts,tsx}", "./src/**/*.{js,jsx,ts,tsx}"], theme: { extend: { color: { crimson: "#DC1E37", }, }, }, plugins: [], }
And here is how I'm using it: tw.style('font-bold text-crimson')}
tw.style('font-bold text-crimson')}
All default tailwind classes work. Only my custom classes throw errors. Any ideas on how to get custom classes working are welcome.
i think you need to use the key colors instead of color. can you try that?
colors
color
:face_palm_emoji
@jaredh159 Thank you. Ouch, I feel silly not catching that.
no problem, happens to all of us :)
My custom utilities are not working, and throwing errors like:
unknown or invalid utility
Here is my setup:
And here is how I'm using it:
tw.style('font-bold text-crimson')}
All default tailwind classes work. Only my custom classes throw errors. Any ideas on how to get custom classes working are welcome.