You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2018. It is now read-only.
Currently, the (to)-em and (to)-rem mixins and functions don't handle anything but unitless values.
I'm so used to passing in a px on the end of my string that the output then breaks. It would be great to strip units on whatever was supplied before the calculation.
The text was updated successfully, but these errors were encountered:
This feels a bit like over engineering an old habit. Scally was designed to use rems for everything (except maybe borders), it isn’t a great development experience to be thinking in pixels when your framework is using scalable units.
Additionally allowing the user to pass units when they are only going to be stripped away sets false expectations and is confusing. If I write something as specific as 30px, I expect it to be 30px. Stripping the units and converting to-rems or to-ems as these functions are designed to do give the user a result different than they expected. I would argue that it is better to keep everything unit-less and only ever provide a unit when absolutely required, such as with borders as you don’t want those to scale.
But the expectation is the same right? The mixins and functions only actually take pixel values, it just happens to be unitless pixels. If you pass in 13, that means 13px. What you get out of it will still be the same (13/16)rem.
It just makes it a bit more robust imo.
stowball
added a commit
to stowball/scally
that referenced
this issue
Apr 24, 2015
Currently, the
(to)-em
and(to)-rem
mixins and functions don't handle anything but unitless values.I'm so used to passing in a
px
on the end of my string that the output then breaks. It would be great to strip units on whatever was supplied before the calculation.The text was updated successfully, but these errors were encountered: