summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-em.scss
diff options
context:
space:
mode:
Diffstat (limited to 'debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-em.scss')
-rw-r--r--debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-em.scss24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-em.scss b/debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-em.scss
new file mode 100644
index 0000000..89f33fb
--- /dev/null
+++ b/debian/missing-sources/bourbon/app/assets/stylesheets/functions/_px-to-em.scss
@@ -0,0 +1,24 @@
+// 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;
+}