]> git.ipfire.org Git - thirdparty/foundation/foundation-emails.git/commitdiff
Fix sass warning about slash-div
authorCPatchane <code@patchane.com>
Wed, 21 Jul 2021 10:45:01 +0000 (12:45 +0200)
committerCPatchane <code@patchane.com>
Fri, 18 Feb 2022 09:52:52 +0000 (10:52 +0100)
scss/grid/_block-grid.scss
scss/grid/_grid.scss
scss/util/_util.scss
yarn.lock

index 0a38192ab435ac4ce27428dc4bed02189a28f02c..97226e4d6b004036356a2ce96fa96206d4481608 100755 (executable)
@@ -1,6 +1,7 @@
 // Foundation for Emails by ZURB
 // zurb.com/ink/
 // Licensed under MIT Open Source
+@use "sass:math";
 
 ////
 /// @group block-grid
@@ -20,13 +21,13 @@ $block-grid-gutter: $global-gutter !default;
 
   td {
     display: inline-block;
-    padding: $block-grid-gutter / 2;
+    padding: math.div($block-grid-gutter, 2);
   }
 }
 
 // Sizing classes
 @for $i from 2 through $block-grid-max {
   .up-#{$i} td {
-    width: floor(($global-width - $i * $block-grid-gutter) / $i) !important;
+    width: floor(math.div($global-width - $i * $block-grid-gutter, $i)) !important;
   }
 }
index bb3295a034ca16b3593072efc54fa390b9af3f4f..7d85883f6c869846dbbc576eb23b040685b7a0dc 100755 (executable)
@@ -1,6 +1,7 @@
 // Foundation for Emails by ZURB
 // zurb.com/ink/
 // Licensed under MIT Open Source
+@use "sass:math";
 
 ////
 /// @group grid
@@ -117,8 +118,8 @@ th.column {
   td.large-#{$i},
   th.large-#{$i} {
     width: -zf-grid-calc-px($i, $grid-column-count, $global-width);
-    padding-left: $global-gutter / 2;
-    padding-right: $global-gutter / 2;
+    padding-left: math.div($global-gutter, 2);
+    padding-right: math.div($global-gutter, 2);
   }
 
   td.large-#{$i}.first,
index faabca543b712cc601e77b3ab9ed849ab395c077..af6d323fe2a858398bcd0c736d7146f30e1abe63 100755 (executable)
@@ -1,6 +1,7 @@
 // Foundation for Emails by ZURB
 // foundation.zurb.com
 // Licensed under MIT Open Source
+@use "sass:math";
 
 /// Calculates a percentage value for a grid column width.
 /// @access private
@@ -8,7 +9,7 @@
 /// @param {number} $totalColumns - Column count of the entire row.
 /// @returns {number} A percentage width value.
 @function -zf-grid-calc-pct($colNumber, $totalColumns) {
-  @return floor(percentage(($colNumber / $totalColumns)) * 1000000) / 1000000;
+  @return math.div(floor(percentage(math.div($colNumber, $totalColumns)) * 1000000), 1000000);
 }
 
 /// Calculates a pixel value for a grid column width.
@@ -18,5 +19,5 @@
 /// @param {number} $containerWidth - Width of the surrounding container, in pixels.
 /// @returns {number} A pixel width value.
 @function -zf-grid-calc-px($columnNumber, $totalColumns, $containerWidth) {
-  @return ($containerWidth / $totalColumns * $columnNumber - $global-gutter);
+  @return (math.div($containerWidth, $totalColumns) * $columnNumber - $global-gutter);
 }
index d798bd8240e7fa497a65b3385a4a22917980d159..5a920fb1d759ef526be5e05114905463ea2b26cf 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -4,12 +4,12 @@
 
 "@babel/parser@^7.9.4":
   version "7.10.5"
-  resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.5.tgz#e7c6bf5a7deff957cec9f04b551e2762909d826b"
+  resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz"
   integrity sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==
 
 "@gulp-sourcemaps/identity-map@1.X":
   version "1.0.2"
-  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz#1e6fe5d8027b1f285dc0d31762f566bccd73d5a9"
+  resolved "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz"
   integrity sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ==
   dependencies:
     acorn "^5.0.3"
@@ -20,7 +20,7 @@
 
 "@gulp-sourcemaps/map-sources@1.X":
   version "1.0.0"
-  resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
+  resolved "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz"
   integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o=
   dependencies:
     normalize-path "^2.0.1"