// rem.sass
//
// @package assetify/helpers
// @media screen
// @version 1.0
// @see https://github.com/bitmanic/rem

// 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.
$baseline-px: 10px !default

=rem($property, $px-values)
  // Convert the baseline into rems
  $baseline-rem: $baseline-px / 1rem

  // Print the first line in pixel values
  #{$property}: $px-values

  // If there is only one (numeric) value, return the property/value line for it.
  @if type-of($px-values) == "number"
    #{$property}: $px-values / $baseline-rem
  @else
    // Create an empty list that we can dump values into
    $rem-values: ()

    @each $value in $px-values

      // If the value is zero or not a number, return it
      @if $value == 0 or type-of( $value ) != "number"
        $rem-values: append($rem-values, $value)
      @else
        $rem-values: append($rem-values, $value / $baseline-rem)

    // Return the property and its list of converted values
    #{$property}: $rem-values
// rem.sass
//
// @package assetify/helpers
// @media screen
// @version 1.0
// @see https://github.com/bitmanic/rem

// 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.
$baseline-px: 10px !default

@mixin rem($property, $px-values)
  // Convert the baseline into rems
  $baseline-rem: $baseline-px / 1rem

  // Print the first line in pixel values
  #{$property}: $px-values

  // If there is only one (numeric) value, return the property/value line for it.
  @if type-of($px-values) == "number"
    #{$property}: $px-values / $baseline-rem
  @else
    // Create an empty list that we can dump values into
    $rem-values: ()

    @each $value in $px-values

      // If the value is zero or not a number, return it
      @if $value == 0 or type-of( $value ) != "number"
        $rem-values: append($rem-values, $value)
      @else
        $rem-values: append($rem-values, $value / $baseline-rem)

    // Return the property and its list of converted values
    #{$property}: $rem-values
Use “@mixin” instead of “=”.
[➠] Use “@mixin” instead of “=”.
