I have recently started using SASS and pretty new to writing mixins.
I am trying to create some generic classes and would like to use REM units, but also providing a pixel fallback.
Here is a codepen – http://codepen.io/anon/pen/ulopB
As you can see I have set the main value as a variable, and am using this variable in the classes, but this is only outputting REM, how can I output so there is a pixel fallback using a mixin?
I have seen this article https://gist.github.com/drublic/4374738 but this is for font sizes
Thanks in advance
Ok I have figured it out here, http://codepen.io/anon/pen/mlsuh
Feel free to comment if there is a more efficient way to to do this.
You must be logged in to reply to this topic.