Configure the number to rem values. #3082
christhofer
started this conversation in
Ideas
Replies: 3 comments 4 replies
-
You can convert generated css in |
Beta Was this translation helpful? Give feedback.
3 replies
-
I can't find a way to read the config from inside the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently using preset Uno/Wind, we have the spacing like
m-4
gives 1rem / 16pxm-6
gives 1.5rem / 24pxCan we make the multiplier to be configurable? I want to custom the number, like
m-4
gives 0.25rem / 4pxm-6
gives 0.375rem / 6pxm-16
gives 1rem / 16pxm-30
gives 1.875rem / 30pxBasically the number equals to the pixel, but the CSS uses rem.
I looked around the source code, the calculation is hardcoded here.
Can we have the
4
here to be configurable, allows us to change it to16
.I know we can do
m-16px
andm-30px
, but I want to use rem, and calculating30/16
to getm-1.875rem
is not practical.I also know we can use rules:
But then we also need to change the rules for
mt-
,mb-
,mr-
,mt-
,w-
,min-w-
, and so on. It's so many. And thespace-x-
space-y-
is not that simple.I'm willing to make the pull request if my request here got a green light.
My idea is to add a property to config
theme
, maybe likeremDivider
(any idea is appreciated)Beta Was this translation helpful? Give feedback.
All reactions