Create dynamic values for custom tailwind classes in tailwind.config.ts #15290
abedshaaban
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The main idea is to create a class for example
super
which is a typography class name I want for thefontSize
. and I can use it whenever I have a title ,className={'text-super'}
, in the hero section and I don't need to use the screen breakpoints likemd
,lg
, ... to update the size everytime I use it.Setup would be something like this (just me thinking, it would be probably wrong):
as you can see I created a
in the object to specify the breakpoint I am toggling as the attribute, this attribute is a custom one I created.
Btw, do we have something similar to this one or is it hard to implement?
Beta Was this translation helpful? Give feedback.
All reactions