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.37 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.36 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.35 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.34 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.33 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.32 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.31 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.30 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.29 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.28 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.27 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.26 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.25 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.24 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.23 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.22 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.21 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.20 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.19 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss
smock-0.1.18 app/assets/stylesheets/thirdparty/bourbon/functions/_px-to-rem.scss