-
Notifications
You must be signed in to change notification settings - Fork 21
Conventions for Adding Custom Styles in Tailwind
acd edited this page Aug 24, 2023
·
1 revision
If you want to add a custom utility CSS class, it should be added inside packages/utils/tailwind-plugins/utilities/index.js
.
The agreed prefix nomenclature for custom classes is u-
, for example u-your-class
.
If you want to add a keyframe that is not meant to be publicly exposed, it should be added inside packages/utils/tailwind-plugins/animations/index.js
.
The agreed prefix nomenclature for standalone keyframes is standalone-
, for example:
// inside keyframes field
keyframes: {
standaloneFoo: ...
}
And inside the animations field:
// inside animations field
animations: {
'standalone-foo': 'standaloneFoo 0.5s ease-in-out',
}