I'd like to be able specify a style variable for height and width of an element and have that be divided by 16px (the base) for rem calculation so it can be used across different elements. I know I can add individual element style variables and use a formula to calculate the rem value but I need to do this for every element. It would be great if I could just have height and width be calculated by a formula so that I punch in the pixel value and it calculates the rem for me. Is that possible?
✅1
Max
1 year ago
I am not sure I understand what you want to do 🧐
Can you add a screenshot or one of your nice short videos you do?
Ah, I don't think you can do that globally. You would have to do the calculation in another tool (a calculator, I guess 😅) and hard code the values into the theme. Or add the style variables to each element, as you are doing at the moment...