Sha256: 6735a43675469a2a8101bee45976a7a77d664e0fdb322c1404c271ff64024852

Contents?: true

Size: 340 Bytes

Versions: 346

Compression:

Stored size: 340 Bytes

Contents

// Convert pixels to rems
// eg. for a relational value of 12px write rem(12)
// Assumes $em-base is the font-size of <html>

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

  $base: $em-base;
  @if not unitless($base) {
      $base: strip-units($base);
  }
  @return ($pxval / $base) * 1rem;
}

Version data entries

346 entries across 338 versions & 11 rubygems

Version Path
smock-0.1.17 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.16 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.15 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.14 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.13 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.12 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.11 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.10 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.8 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.7 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
wrgem-0.0.32 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.31 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.30 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.29 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.28 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.27 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.26 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.25 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.24 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss
wrgem-0.0.23 lib/generators/wrstart/template/vendor/assets/components/bourbon/dist/functions/_px-to-rem.scss