Debian Codegraph @

debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-rem.scss

raw
1 // Convert pixels to rems
2 // eg. for a relational value of 12px write rem(12)
3 // Assumes $em-base is the font-size of <html>
4
5 @function rem($pxval) {
6 @if $output-bourbon-deprecation-warnings == true {
7 @warn "[Bourbon] [Deprecation] `rem` is deprecated and will be " +
8 "removed in 5.0.0.";
9 }
10
11 $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
12 $output-bourbon-deprecation-warnings: false !global;
13
14 @if not unitless($pxval) {
15 $pxval: strip-units($pxval);
16 }
17
18 $base: $em-base;
19 @if not unitless($base) {
20 $base: strip-units($base);
21 }
22
23 $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
24
25 @return ($pxval / $base) * 1rem;
26 }