// Survival ✚ Kit // Sets the font size specified in pixels using percents so that the base // font size changes and 1em has the correct value. When nesting font size // declarations, within the DOM tree, the base_font_size must be the parent's // effective font-size in pixels. // Usage Examples: // .big // +font-size(16px) // .bigger // +font-size(18px) // .big .bigger // +font-size(18px, 16px) // // For more information see the table found at http://developer.yahoo.com/yui/3/cssfonts/#fontsize // From: compass-html5-boilerplate gem. @function size($size, $base-font-size: $base-font-size) { @return ceil(percentage($size / $base-font-size)); } // Calculate margin and line height according to the given size. @mixin header-size($size) { font-size: size($size); } // Calculate the Header based on the H1 Max size. @mixin htags-sizes($max) { $per: $max * 0.10; @for $i from 1 through 6 { h#{$i} { @include header-size($max - ($per * $i) ); } } }