-
-
Notifications
You must be signed in to change notification settings - Fork 21
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Presets for fluid types and spacing #42
Comments
Hey, thanks for the write-up. I thought about adding this a while back but I decided against it for a few reasons:
I'm curious to hear your thoughts 👋 |
Thank you for the quick response!
I get your point. And I agree with the docs here actually. But I think the fluid classes should not be compared to the static classes from default tailwind. So instead of comparing
So instead of treating the
Does it even make sense to have In contrary: For colors
Not sure what exactly will change in Tailwind v4, but by "break up the classes" do you mean something like ConclusionHope I could bring accross my points well! If you think presets are not possible to implement without paying in flexibility, I would also dismiss this feature request. In my naive view I think you can build the presets on top of the flexible base system and also on library-level, using previously mentioned propsed API. Maybe not with existing typographies like To go even further (and out of scope): Fluid classes would be more like a replacement instead of an addition to the current system. I would prefer that fluid classes become the default with |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In order to build meaningful design systems it is desired to limit the options a developer can choose from.
Example: Instead of having to write
~text-xl/3xl
or~pt-3/6
it is more desired to have presets like~text-h1
and~pt-sm
. Alternatively "shorthands" with just one value instead of start and end values could make also sense.E.g:
~text-xl
: Will produce same as~text-xl/3xl)
~pt-3
: Will produce same as~pt-3/6
Proposed API to add Presets:
It would be nice to have some great defaults for this as well.
Do you think something this is possible or too complex?
I love this library and it's probaby is the best when it comes to fluid types and spacing in tailwind. I think this feature can make it even more awesome.
Tailwind Utopia is doing something similar with:
fl-text-xl
Current undesired solution
For typography it works kind of good with
@apply
:But for spacing it will be very cumbersome, since you have to define it for all possible spacing attributes like
padding
,margin
,gap
, etc. And using@apply
is generally highly discouraged.The text was updated successfully, but these errors were encountered: