Skip to content

Commit 99ce768

Browse files
fix(sass): update depreciated division on dart sass
1 parent c75a23d commit 99ce768

File tree

6 files changed

+36
-31
lines changed

6 files changed

+36
-31
lines changed

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sass/sass/components/level.sass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
$level-item-spacing: ($block-spacing / 2) !default
1+
@use "sass:math"
2+
$level-item-spacing: math.div($block-spacing, 2) !default
23

34
.level
45
@extend %block

src/sass/sass/elements/button.sass

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
$button-color: $text-strong !default
23
$button-background-color: $scheme-main !default
34
$button-family: false !default
@@ -73,14 +74,14 @@ $button-colors: $colors !default
7374
height: 1.5em
7475
width: 1.5em
7576
&:first-child:not(:last-child)
76-
+ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}), false)
77-
+ltr-property("margin", $button-padding-horizontal / 4)
77+
+ltr-property("margin", calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width}), false)
78+
+ltr-property("margin", math.div($button-padding-horizontal, 4))
7879
&:last-child:not(:first-child)
79-
+ltr-property("margin", $button-padding-horizontal / 4, false)
80-
+ltr-property("margin", calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width}))
80+
+ltr-property("margin", math.div($button-padding-horizontal, 4), false)
81+
+ltr-property("margin", calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width}))
8182
&:first-child:last-child
82-
margin-left: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
83-
margin-right: calc(#{-1 / 2 * $button-padding-horizontal} - #{$button-border-width})
83+
margin-left: calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width})
84+
margin-right: calc(#{math.div(1, 2) * $button-padding-horizontal} - #{$button-border-width})
8485
// States
8586
&:hover,
8687
&.is-hovered

src/sass/sass/grid/columns.sass

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
$column-gap: 0.75rem !default
23

34
.column
@@ -59,9 +60,9 @@ $column-gap: 0.75rem !default
5960
@for $i from 0 through 12
6061
.columns.is-mobile > &.is-#{$i}
6162
flex: none
62-
width: percentage($i / 12)
63+
width: percentage(math.div($i, 12))
6364
.columns.is-mobile > &.is-offset-#{$i}
64-
margin-left: percentage($i / 12)
65+
margin-left: percentage(math.div($i, 12))
6566
+mobile
6667
&.is-narrow-mobile
6768
flex: none
@@ -116,9 +117,9 @@ $column-gap: 0.75rem !default
116117
@for $i from 0 through 12
117118
&.is-#{$i}-mobile
118119
flex: none
119-
width: percentage($i / 12)
120+
width: percentage(math.div($i, 12))
120121
&.is-offset-#{$i}-mobile
121-
margin-left: percentage($i / 12)
122+
margin-left: percentage(math.div($i, 12))
122123
+tablet
123124
&.is-narrow,
124125
&.is-narrow-tablet
@@ -194,10 +195,10 @@ $column-gap: 0.75rem !default
194195
&.is-#{$i},
195196
&.is-#{$i}-tablet
196197
flex: none
197-
width: percentage($i / 12)
198+
width: percentage(math.div($i, 12))
198199
&.is-offset-#{$i},
199200
&.is-offset-#{$i}-tablet
200-
margin-left: percentage($i / 12)
201+
margin-left: percentage(math.div($i, 12))
201202
+touch
202203
&.is-narrow-touch
203204
flex: none
@@ -252,9 +253,9 @@ $column-gap: 0.75rem !default
252253
@for $i from 0 through 12
253254
&.is-#{$i}-touch
254255
flex: none
255-
width: percentage($i / 12)
256+
width: percentage(math.div($i, 12))
256257
&.is-offset-#{$i}-touch
257-
margin-left: percentage($i / 12)
258+
margin-left: percentage(math.div($i, 12))
258259
+desktop
259260
&.is-narrow-desktop
260261
flex: none
@@ -309,9 +310,9 @@ $column-gap: 0.75rem !default
309310
@for $i from 0 through 12
310311
&.is-#{$i}-desktop
311312
flex: none
312-
width: percentage($i / 12)
313+
width: percentage(math.div($i, 12))
313314
&.is-offset-#{$i}-desktop
314-
margin-left: percentage($i / 12)
315+
margin-left: percentage(math.div($i, 12))
315316
+widescreen
316317
&.is-narrow-widescreen
317318
flex: none
@@ -366,9 +367,9 @@ $column-gap: 0.75rem !default
366367
@for $i from 0 through 12
367368
&.is-#{$i}-widescreen
368369
flex: none
369-
width: percentage($i / 12)
370+
width: percentage(math.div($i, 12))
370371
&.is-offset-#{$i}-widescreen
371-
margin-left: percentage($i / 12)
372+
margin-left: percentage(math.div($i, 12))
372373
+fullhd
373374
&.is-narrow-fullhd
374375
flex: none
@@ -423,9 +424,9 @@ $column-gap: 0.75rem !default
423424
@for $i from 0 through 12
424425
&.is-#{$i}-fullhd
425426
flex: none
426-
width: percentage($i / 12)
427+
width: percentage(math.div($i, 12))
427428
&.is-offset-#{$i}-fullhd
428-
margin-left: percentage($i / 12)
429+
margin-left: percentage(math.div($i, 12))
429430

430431
.columns
431432
margin-left: (-$column-gap)

src/sass/sass/grid/tiles.sass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
$tile-spacing: 0.75rem !default
23

34
.tile
@@ -31,4 +32,4 @@ $tile-spacing: 0.75rem !default
3132
@for $i from 1 through 12
3233
&.is-#{$i}
3334
flex: none
34-
width: ($i / 12) * 100%
35+
width: math.div($i, 12) * 100%

src/sass/sass/utilities/functions.sass

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:math"
12
@function mergeColorMaps($bulma-colors, $custom-colors)
23
// We return at least Bulma's hard-coded colors
34
$merged-colors: $bulma-colors
@@ -67,11 +68,11 @@
6768
$color-rgb: ('red': red($color),'green': green($color),'blue': blue($color))
6869
@each $name, $value in $color-rgb
6970
$adjusted: 0
70-
$value: $value / 255
71+
$value: math.div($value, 255)
7172
@if $value < 0.03928
72-
$value: $value / 12.92
73+
$value: math.div($value, 12.92)
7374
@else
74-
$value: ($value + .055) / 1.055
75+
$value: math.div(($value + .055), 1.055)
7576
$value: powerNumber($value, 2)
7677
$color-rgb: map-merge($color-rgb, ($name: $value))
7778
@return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722)

0 commit comments

Comments
 (0)