Skip to content

preset-ext and strict mode question #302

Answered by sastan
zslabs asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there! As always, really appreciate all the hard-work going into twind v1. I was looking into two aspects of the current beta and was hoping to get a bit of clarification:

  1. Is preset-ext included by default in preset-tailwind? My hope was to deter the usage of these magic-values p-[4.5343px] and depend more on what is in the theme config, but I was having trouble finding if this in the tailwind preset folder.

This is a builtin feature of twind. If a rule uses the fromTheme helper it automatically supports arbitrary values. Here is the example for padding: https://github.com/tw-in-js/twind/blob/next/packages/preset-tailwind/src/rules.ts#L246. The basic idea is if a value is not foun…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zslabs
Comment options

Answer selected by zslabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants