I am very new to Tailwind, and want to incorporate it into an existing react project. Can I use Tailwind along with all of my current CSS/sass files? Or do I need to start over with styling and only use Tailwind?
To ensure that your current CSS doesn't get overridden. You can add a prefix to the tailwind.config.js
Example: (source: tailwind.com)
// tailwind.config.js
module.exports = {
prefix: 'tw-',
}
Will generate classes with the prefix .tw-
like .tw-{class}
:
.tw-text-left {
text-align: left;
}
.tw-text-center {
text-align: center;
}
.tw-text-right {
text-align: right;
}
/* etc. */
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With