SCSS Math with theme()? #4158
Replies: 2 comments
-
Hey! That should work, if you wrap this calculation in a Here's an example using roughly the same setup that you're mentioning (the https://play.tailwindcss.com/mbSvnirCj2?file=css Hope it helps 👍 |
Beta Was this translation helpful? Give feedback.
-
Yes, I did try it with Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all!
This might be a dumb question, but I'm new to tailwind and trying to setup fixed height by subtracting padding, margins and header height. So, I have something like
p-5
for body and header ish-20
withmb-5
. And so on.As you can see, I need the value of
mb-5 + mb-5 + mb-5
(p-5
andm-5
have the same value). So, I was wondering if I could do something like:theme('height.20') + (3 * theme('margin.5'))
. I'm not sure if this is possible or not, but I'm getting an errorUndefined operation: "3 times theme("margin.5")"
.Is this doable or do I need to add it three times?
Beta Was this translation helpful? Give feedback.
All reactions