Hi,
I've written what I think is a useful little mixin that allows for
defining font-size using rem (
http://snook.ca/archives/html_and_css/font-size-with-rem
) that provides for browsers not supporting rems by also outputting a
px size first.
Variable and Mixin:
$px-base-font-size: 16px
=font-size-rem($rem, $px-base-font-size: 16px)
font-size: floor($px-base-font-size * $rem)
font-size: #{$rem}rem
($px-base-font-size can be set as the html font size, which is
necessary if it's going to be something other than 16px which tends to
be the default)
Sass:
+font-size-rem(1.9)
CSS:
font-size: 30px;
font-size: 1.9rem;
Two questions:
1. Is it worth me making a pull request to have it added to Compass?
2. If so, could you please advise me on conventions: where to put it
and how to handle the variable. I still don't feel I'm familiar with
the proper way of doing things.
Thanks.