sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
360 stars 73 forks source link

How to get translate by percents? #188

Closed NCrashed closed 3 years ago

NCrashed commented 5 years ago

I'd like to get transform: translateY(-50%); in output, but http://hackage.haskell.org/package/clay-0.13.1/docs/Clay-Transform.html#v:translateY doesn't accept Size Percentage. Is it intentional design?

NCrashed commented 5 years ago

I found workaround:

translatePctY y = prefixed (browsers <> "transform") $ "translateY(" <> value y <> ")"
turion commented 5 years ago

Is it intentional design?

Seems like an arbitrary restriction. https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translateY#Syntax says one can translate by percentages. PRs that relax the typing constraints on the translate* functions welcome.

github-actions[bot] commented 4 years ago

Stale issue message

github-actions[bot] commented 3 years ago

This issue has not seen any activity in a long time. If no further activity occurs, it will be closed after ten weeks.