sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
357 stars 72 forks source link

translateX and translateY should accept Size Percentage as well as Size LengthUnit argument #218

Open ddssff opened 3 years ago

ddssff commented 3 years ago

Currently I have to say

transform $ translateX (other "-50%")
transform $ translateY (other "-50%")

On the other hand, transform $ translate (pct (- 50)) (pct (- 50)) works and is what you actually want, the two transforms above interfere with each other.

hsyl20 commented 1 year ago

+1 for this

turion commented 8 months ago

Currently I have to say

transform $ translateX (other "-50%")
transform $ translateY (other "-50%")

Instead of what do you have to say this?

ddssff commented 8 months ago

I'm not sure I understand the question.

turion commented 8 months ago

You wrote "Currently I have to say", but I'm not sure what the problem with the code transform $ translateX (other "-50%") is. Is the problem that you have to use other instead of pct?

ddssff commented 8 months ago

Yes that's it. other is unsafe.