Skip to content

Commit 6c80d4b

Browse files
committed
Replace deprecated global functions
1 parent 7792fcb commit 6c80d4b

File tree

6 files changed

+30
-27
lines changed

6 files changed

+30
-27
lines changed

scss/components/_button.scss

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// zurb.com/ink/
33
// Licensed under MIT Open Source
44
@use "sass:color";
5+
@use "sass:map";
56

67
////
78
/// @group button
@@ -72,13 +73,13 @@ table.button {
7273

7374
a {
7475
font-family: $body-font-family;
75-
font-size: map-get($button-font-size, default);
76+
font-size: map.get($button-font-size, default);
7677
font-weight: $button-font-weight;
7778
color: $button-color;
7879
text-decoration: none;
7980
text-align: left;
8081
display: inline-block;
81-
padding: map-get($button-padding, default);
82+
padding: map.get($button-padding, default);
8283
border: 0 solid $button-background;
8384
border-radius: $button-radius;
8485
}
@@ -119,11 +120,11 @@ table.button.tiny {
119120
table {
120121
td,
121122
a {
122-
padding: map-get($button-padding, tiny);
123+
padding: map.get($button-padding, tiny);
123124
}
124125

125126
a {
126-
font-size: map-get($button-font-size, tiny);
127+
font-size: map.get($button-font-size, tiny);
127128
font-weight: normal;
128129
}
129130
}
@@ -133,17 +134,17 @@ table.button.small {
133134
table {
134135
td,
135136
a {
136-
padding: map-get($button-padding, small);
137-
font-size: map-get($button-font-size, small);
137+
padding: map.get($button-padding, small);
138+
font-size: map.get($button-font-size, small);
138139
}
139140
}
140141
}
141142

142143
table.button.large {
143144
table {
144145
a {
145-
padding: map-get($button-padding, large);
146-
font-size: map-get($button-font-size, large);
146+
padding: map.get($button-padding, large);
147+
font-size: map.get($button-font-size, large);
147148
}
148149
}
149150
}

scss/components/_callout.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,31 +63,31 @@ th.callout-inner {
6363
background: $callout-background;
6464

6565
&.primary {
66-
background: scale-color($primary-color, $lightness: $callout-background-fade);
66+
background: color.scale($primary-color, $lightness: $callout-background-fade);
6767
border: $callout-border-primary;
6868
color: $black;
6969
}
7070

7171
&.secondary {
72-
background: scale-color($secondary-color, $lightness: $callout-background-fade);
72+
background: color.scale($secondary-color, $lightness: $callout-background-fade);
7373
border: $callout-border-secondary;
7474
color: $black;
7575
}
7676

7777
&.success {
78-
background: scale-color($success-color, $lightness: $callout-background-fade);
78+
background: color.scale($success-color, $lightness: $callout-background-fade);
7979
border: $callout-border-success;
8080
color: $black;
8181
}
8282

8383
&.warning {
84-
background: scale-color($warning-color, $lightness: $callout-background-fade);
84+
background: color.scale($warning-color, $lightness: $callout-background-fade);
8585
border: $callout-border-warning;
8686
color: $black;
8787
}
8888

8989
&.alert {
90-
background: scale-color($alert-color, $lightness: $callout-background-fade);
90+
background: color.scale($alert-color, $lightness: $callout-background-fade);
9191
border: $callout-border-alert;
9292
color: $black;
9393
}

scss/components/_typography.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,27 @@ $header-font-weight: $global-font-weight !default;
4646

4747
/// Font size of `<h1>` elements.
4848
/// @type Number
49-
$h1-font-size: floor($global-font-size * 2.125) !default;
49+
$h1-font-size: math.floor($global-font-size * 2.125) !default;
5050

5151
/// Font size of `<h2>` elements.
5252
/// @type Number
53-
$h2-font-size: floor($global-font-size * 1.875) !default;
53+
$h2-font-size: math.floor($global-font-size * 1.875) !default;
5454

5555
/// Font size of `<h3>` elements.
5656
/// @type Number
57-
$h3-font-size: floor($global-font-size * 1.75) !default;
57+
$h3-font-size: math.floor($global-font-size * 1.75) !default;
5858

5959
/// Font size of `<h4>` elements.
6060
/// @type Number
61-
$h4-font-size: floor($global-font-size * 1.5) !default;
61+
$h4-font-size: math.floor($global-font-size * 1.5) !default;
6262

6363
/// Font size of `<h5>` elements.
6464
/// @type Number
65-
$h5-font-size: floor($global-font-size * 1.2) !default;
65+
$h5-font-size: math.floor($global-font-size * 1.2) !default;
6666

6767
/// Font size of `<h6>` elements.
6868
/// @type Number
69-
$h6-font-size: floor($global-font-size * 1.125) !default;
69+
$h6-font-size: math.floor($global-font-size * 1.125) !default;
7070

7171
/// Margin bottom of `<h1>` through `<h6>` elements.
7272
/// @type Number

scss/grid/_block-grid.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ $block-grid-gutter: $global-gutter !default;
2828
// Sizing classes
2929
@for $i from 2 through $block-grid-max {
3030
.up-#{$i} td {
31-
width: floor(math.div($global-width - $i * $block-grid-gutter, $i)) !important;
31+
width: math.floor(math.div($global-width - $i * $block-grid-gutter, $i)) !important;
3232
}
3333
}

scss/settings/_settings.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:math';
2+
13
// Foundation for Emails Settings
24
// ------------------------------
35
//
@@ -64,12 +66,12 @@ $global-font-size: 16px;
6466
$body-line-height: $global-line-height;
6567
$header-font-family: $body-font-family;
6668
$header-font-weight: $global-font-weight;
67-
$h1-font-size: floor($global-font-size * 2.125);
68-
$h2-font-size: floor($global-font-size * 1.875);
69-
$h3-font-size: floor($global-font-size * 1.75);
70-
$h4-font-size: floor($global-font-size * 1.5);
71-
$h5-font-size: floor($global-font-size * 1.2);
72-
$h6-font-size: floor($global-font-size * 1.125);
69+
$h1-font-size: math.floor($global-font-size * 2.125);
70+
$h2-font-size: math.floor($global-font-size * 1.875);
71+
$h3-font-size: math.floor($global-font-size * 1.75);
72+
$h4-font-size: math.floor($global-font-size * 1.5);
73+
$h5-font-size: math.floor($global-font-size * 1.2);
74+
$h6-font-size: math.floor($global-font-size * 1.125);
7375
$header-margin-bottom: 10px;
7476
$paragraph-margin-bottom: 10px;
7577
$small-font-size: 80%;

scss/util/_util.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/// @param {number} $totalColumns - Column count of the entire row.
1010
/// @returns {number} A percentage width value.
1111
@function -zf-grid-calc-pct($colNumber, $totalColumns) {
12-
@return math.div(floor(percentage(math.div($colNumber, $totalColumns)) * 1000000), 1000000);
12+
@return math.div(math.floor(math.percentage(math.div($colNumber, $totalColumns)) * 1000000), 1000000);
1313
}
1414

1515
/// Calculates a pixel value for a grid column width.

0 commit comments

Comments
 (0)