Tailwindcss-jit impact #360
-
How does the new 'tailwindcss-jit' fit into twin? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hey there, |
Beta Was this translation helpful? Give feedback.
-
Since v2.5.0, twin now has support for the features added with the tailwind JIT mode. Arbitrary values - Supported since v2.5.0 🎉tw`top-[calc(100vh - 2rem)]`
// ↓ ↓ ↓ ↓ ↓ ↓
;({ top: 'calc(100vh - 2rem)' }) Similar twin’s “short css” syntax, arbitrary values use square brackets to allow custom css values instead of classes built from your tailwind.config.js. This is a good solution for those unique “once off” values that every project requires which you may not want to add to your tailwind.config.js. Read more about arbitrary values → Important prefix - Supported since v2.5.0 🎉Use a bang tw`!block`;
// ↓ ↓ ↓ ↓ ↓ ↓
;({ "display": "block !important" }) All variants enabledTwin has a cartload of variants ready to use. Stackable variantsStack variants and create class sets with brackets: <button tw="md:dark:disabled:focus:hover:(bg-gray-400 text-red-500)" /> Thanks! |
Beta Was this translation helpful? Give feedback.
-
any plan about arbitrary value support? |
Beta Was this translation helpful? Give feedback.
Since v2.5.0, twin now has support for the features added with the tailwind JIT mode.
Arbitrary values - Supported since v2.5.0 🎉
Similar twin’s “short css” syntax, arbitrary values use square brackets to allow custom css values instead of classes built from your tailwind.config.js.
This is a good solution for those unique “once off” values that every project requires which you may not want to add to your tailwind.config.js.
Read more about arbitrary values →
Important prefix - Supported since v2.5.0 🎉
Use a bang
!
prefix to add important styles:S…