Sha256: aa95ba1e33e796433dcd67718dae2354080f89eb37d8d7a8a96d1470ef2a633e
Contents?: true
Size: 1.41 KB
Versions: 14
Compression:
Stored size: 1.41 KB
Contents
// Baseline, measured in pixels // The value should be the same as the font-size value for the html element // If the html element's font-size is set to 62.5% (of the browser's default font-size of 16px), // then the variable below would be 10px. // original https://github.com/bitmanic/rem // customize by machida $baseline-px: $root-font-size !default =rem($property, $px-values, $important: null) // Convert the baseline into rems $baseline-rem: $baseline-px / 1rem // remが使えないブラウザ用にpx版を出力 @if $important #{$property}: $px-values !important @else #{$property}: $px-values // remで出力 @if px($px-values) and $px-values >= 1 @if $important #{$property}: $px-values / $baseline-rem !important @else #{$property}: $px-values / $baseline-rem @else // Create an empty list that we can dump values into $rem-values: () @each $value in $px-values @if px($value) // If the value is zero or not a number, return it @if strip_unit($value) == 0 or type-of( $value ) != "number" $rem-values: append($rem-values, $value) @else $rem-values: append($rem-values, $value / $baseline-rem) @else $rem-values: append($rem-values, $value) // Return the property and its list of converted values @if $important #{$property}: $rem-values !important @else #{$property}: $rem-values
Version data entries
14 entries across 14 versions & 1 rubygems