ソースを参照

style: scss math modify

richard1015 4 年 前
コミット
2629c655e5
2 ファイル変更5 行追加3 行削除
  1. 1 1
      package.json
  2. 4 2
      src/packages/__VUE/col/index.scss

+ 1 - 1
package.json

@@ -60,7 +60,7 @@
     }
   },
   "dependencies": {
-    "sass": "^1.32.8",
+    "sass": "^1.34.0",
     "vue": "^3.0.5",
     "vue-router": "^4.0.4"
   },

+ 4 - 2
src/packages/__VUE/col/index.scss

@@ -1,3 +1,5 @@
+@use 'sass:math';
+
 .nut-col {
   float: left;
   box-sizing: border-box;
@@ -15,10 +17,10 @@
 
 @for $i from 1 through 24 {
   .nut-col-offset-#{$i} {
-    margin-left: 100/24 * $i * 1%;
+    margin-left: math.div(100, 24) * $i * 1%;
   }
 
   .nut-col-#{$i} {
-    width: 100/24 * $i * 1%;
+    width: math.div(100, 24) * $i * 1%;
   }
 }