Sha256: d1fc50fe71fb5a7421c1967988c25da0c85dc04f023dfadfea9549f56a771fcd

Contents?: true

Size: 737 Bytes

Versions: 37

Compression:

Stored size: 737 Bytes

Contents

// Convert pixels to ems
// eg. for a relational value of 12px write em(12) when the parent is 16px
// if the parent is another value say 24px write em(12, 24)

@function em($pxval, $base: $em-base) {
  @if $output-bourbon-deprecation-warnings == true {
    @warn "[Bourbon] [Deprecation] `em` is deprecated and will be " +
    "removed in 5.0.0.";
  }

  $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
  $output-bourbon-deprecation-warnings: false !global;

  @if not unitless($pxval) {
    $pxval: strip-units($pxval);
  }
  @if not unitless($base) {
    $base: strip-units($base);
  }

  $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;

  @return ($pxval / $base) * 1em;
}

Version data entries

37 entries across 37 versions & 6 rubygems

Version Path
dta_rapid-0.3.0 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.18 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.17 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.16 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.15 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.14 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.13 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.12 _sass/vendor/bourbon/functions/_px-to-em.scss
bourbon-4.3.3 app/assets/stylesheets/functions/_px-to-em.scss
dta_rapid-0.2.11 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.10 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.9 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.8 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.7 _sass/vendor/bourbon/functions/_px-to-em.scss
dta_rapid-0.2.6 _sass/vendor/bourbon/functions/_px-to-em.scss
bourbon-4.3.2 app/assets/stylesheets/functions/_px-to-em.scss
bourbon-4.3.1 app/assets/stylesheets/functions/_px-to-em.scss