thanks for the really good article, one thing I want to ask what if we need to customize the tailwind then won't we need to run any command or an extra css file to convert the actual css to back in tailwind. just confused in this matter.
Hi :) thank you for your question - customizing Tailwind tends to happen in the tailwind.config.js file.
If you wanted to create a new primary colour:
// tailwind.config.js const colors = require('tailwindcss/colors')
module.exports = { theme: { colors: { brand-primary: colors.lightBlue, brand-danger: colors.rose, brand-gray: colors.coolGray, } } }
That way you would have a class with the name "brand-primary" available throughout your project and do not have to write any extra CSS.
You can of course use CSS Rules if you need to, Tailwind does not prevent you from doing so.
Hope that answers your question!
If not let me know, I am glad to reply!
Thanks for the answer.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
thanks for the really good article, one thing I want to ask what if we need to customize the tailwind then won't we need to run any command or an extra css file to convert the actual css to back in tailwind. just confused in this matter.
Hi :) thank you for your question - customizing Tailwind tends to happen in the tailwind.config.js file.
If you wanted to create a new primary colour:
// tailwind.config.js
const colors = require('tailwindcss/colors')
module.exports = {
theme: {
colors: {
brand-primary: colors.lightBlue,
brand-danger: colors.rose,
brand-gray: colors.coolGray,
}
}
}
That way you would have a class with the name "brand-primary" available throughout your project and do not have to write any extra CSS.
You can of course use CSS Rules if you need to, Tailwind does not prevent you from doing so.
Hope that answers your question!
If not let me know, I am glad to reply!
Thanks for the answer.