-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Sass function to convert pixels to rems (resolves #67) #69
Add a Sass function to convert pixels to rems (resolves #67) #69
Conversation
Thank you, @greatislander! This is so awesome and helpful. @ovlb would love a second review here. I think we'll also want to open up an issue to ensure that we change all instances of px to rems using this function. |
@tatianamac Glad to contribute! I’m also happy to take care of the follow-up issue you mentioned, but I figured I would wait to let you review this before jumping ahead to converting everything to use the function :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny thing regarding naming, otherwise everything works fine. Thanks, @greatislander!
If you want, just push the other px -> function replacements to this PR and we skip creating a follow-up issue :)
Sounds good @ovlb! |
One other thought occurred to me — structurally, would there be some value in moving Sass functions and mixins into their own partials that are imported at the top of the base file? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Thanks :)
Yes, there definitely is. I started this work for the regular classes in #75 but skipped the Sass part, as I waited for this PR to get merged. |
@ovlb I think having |
@greatislander That sounds perfect, thanks! |
@ovlb Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
This pull request adds a function for converting pixels to rems as requested in #67. It uses the unitless example from CSS Tricks, so the following will both work: