Create em converter function in SASS not SCSS
I am new to SASS and Compass trying to create one function which can
convert passed pixel value to em. I found one tutorial but it is for SCSS
and that doesn't work with SASS.
Even I have checked on SASS website but seem they have most document for
SCSS and not everything they have describe for SASS.
Here what I am writing
@function em($px, $base: 24px)
@return ($px / $base) * 1em
So when I use it as
font-size: em(16px)
It should convert to 1em in output
Little out of topic: is SASS going to be discontinue? since everywhere I
am only getting document for SCSS even they display title as a SASS
docs..I found SASS is more comfortable since no curly brackets and only
indenting works well. Looks more aligned and less typing.
No comments:
Post a Comment