Skip to content

Commit f11703c

Browse files
fix: the width using sass:math
1 parent 9b87554 commit f11703c

File tree

3 files changed

+3886
-3732
lines changed

3 files changed

+3886
-3732
lines changed

scss/_widths.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
@use "sass:math";
22
// Converted Variables
33

44

@@ -70,8 +70,8 @@
7070
.w-90 { width: 90%; }
7171
.w-100 { width: 100%; }
7272

73-
.w-third { width: (100% / 3); }
74-
.w-two-thirds { width: (100% / 1.5); }
73+
.w-third { width: math.div(100% / 3); }
74+
.w-two-thirds { width: math.div(100% / 1.5); }
7575
.w-auto { width: auto; }
7676

7777
@media #{$breakpoint-not-small} {
@@ -94,8 +94,8 @@
9494
.w-80-ns { width: 80%; }
9595
.w-90-ns { width: 90%; }
9696
.w-100-ns { width: 100%; }
97-
.w-third-ns { width: (100% / 3); }
98-
.w-two-thirds-ns { width: (100% / 1.5); }
97+
.w-third-ns { width: math.div(100% / 3); }
98+
.w-two-thirds-ns { width: math.div(100% / 1.5); }
9999
.w-auto-ns { width: auto; }
100100
}
101101

@@ -119,8 +119,8 @@
119119
.w-80-m { width: 80%; }
120120
.w-90-m { width: 90%; }
121121
.w-100-m { width: 100%; }
122-
.w-third-m { width: (100% / 3); }
123-
.w-two-thirds-m { width: (100% / 1.5); }
122+
.w-third-m { width: math.div(100% / 3); }
123+
.w-two-thirds-m { width: math.div(100% / 1.5); }
124124
.w-auto-m { width: auto; }
125125
}
126126

@@ -144,7 +144,7 @@
144144
.w-80-l { width: 80%; }
145145
.w-90-l { width: 90%; }
146146
.w-100-l { width: 100%; }
147-
.w-third-l { width: (100% / 3); }
148-
.w-two-thirds-l { width: (100% / 1.5); }
147+
.w-third-l { width: math.div(100% / 3); }
148+
.w-two-thirds-l { width: math.div(100% / 1.5); }
149149
.w-auto-l { width: auto; }
150150
}

test.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
// import fs from 'fs'
21
const fs = require('fs');
3-
// import test from 'ava'
42
const test = require('ava');
5-
// import sass from 'node-sass'
63
const sass = require('node-sass');
74

85

0 commit comments

Comments
 (0)