Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit b5a1a02

Browse files
authored
build: fix SCSS division deprecation (#12112)
- remove reference to non-existent `color-palette.scss`
1 parent 5e2d213 commit b5a1a02

File tree

20 files changed

+78
-76
lines changed

20 files changed

+78
-76
lines changed

gulp/config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ module.exports = {
9595
],
9696
themeCore: 'src/core/style/core-theme.scss',
9797
scssBaseFiles: [
98-
'src/core/style/color-palette.scss',
9998
'src/core/style/_variables.scss',
10099
'src/components/input/_input-variables.scss',
101100
'src/core/style/_mixins.scss',

src/components/bottomSheet/bottom-sheet.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ md-bottom-sheet {
102102

103103
/* Mixin for how many grid items to show per row */
104104
@mixin grid-items-per-row($num, $alignEdges: false) {
105-
$width: 100% / $num;
105+
$width: math.div(100%, $num);
106106
flex: 1 1 $width;
107107
max-width: $width;
108108

src/components/button/button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $button-fab-border-radius: 50% !default;
55
$button-icon-border-radius: $button-fab-border-radius !default;
66

77
$button-font-size: $body-font-size-base !default;
8-
$button-font-size-dense: $body-font-size-base * 13/14 !default;
8+
$button-font-size-dense: math.div($body-font-size-base * 13, 14) !default;
99

1010
$button-line-height: rem(3.60) !default;
1111
$button-line-height-dense: rem(3.20) !default;

src/components/card/card.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ md-card {
7575
}
7676

7777
md-card-title {
78-
padding: 3 * $card-padding / 2 $card-padding $card-padding;
78+
padding: 3 * $card-padding * 0.5 $card-padding $card-padding;
7979
display: flex;
8080
flex: 1 1 auto;
8181
flex-direction: row;
@@ -96,13 +96,13 @@ md-card {
9696

9797
&:only-child {
9898
.md-subhead {
99-
padding-top: 3 * $card-padding / 4;
99+
padding-top: 3 * $card-padding * 0.25;
100100
}
101101
}
102102
}
103103

104104
md-card-title-media {
105-
margin-top: - $card-padding / 2;
105+
margin-top: - $card-padding * 0.5;
106106

107107
.md-media-sm {
108108
height: 80px;
@@ -145,7 +145,7 @@ md-card {
145145
&.layout-column {
146146
.md-button {
147147
&:not(.md-icon-button) {
148-
margin: $baseline-grid / 4 0;
148+
margin: $baseline-grid * 0.25 0;
149149

150150
&:first-of-type {
151151
margin-top: 0;
@@ -157,8 +157,8 @@ md-card {
157157
}
158158

159159
&.md-icon-button {
160-
margin-top: 3 * $baseline-grid / 4;
161-
margin-bottom: 3 * $baseline-grid / 4;
160+
margin-top: 3 * $baseline-grid * 0.25;
161+
margin-bottom: 3 * $baseline-grid * 0.25;
162162
}
163163
}
164164
}
@@ -184,15 +184,15 @@ md-card {
184184
}
185185

186186
&.md-icon-button {
187-
margin-left: 3 * $baseline-grid / 4;
188-
margin-right: 3 * $baseline-grid / 4;
187+
margin-left: 3 * $baseline-grid * 0.25;
188+
margin-right: 3 * $baseline-grid * 0.25;
189189

190190
&:first-of-type {
191-
@include rtl-prop(margin-left, margin-right, 3 * $baseline-grid / 2, auto);
191+
@include rtl-prop(margin-left, margin-right, 3 * $baseline-grid * 0.5, auto);
192192
}
193193

194194
&:last-of-type {
195-
@include rtl-prop(margin-right, margin-left, 3 * $baseline-grid / 2, auto);
195+
@include rtl-prop(margin-right, margin-left, 3 * $baseline-grid * 0.5, auto);
196196
}
197197
}
198198

src/components/chips/chips.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $contact-chip-name-width: rem(12) !default;
2020
@include rtl(float, left, right);
2121
img {
2222
height: $chip-height;
23-
border-radius: $chip-height / 2;
23+
border-radius: $chip-height * 0.5;
2424
}
2525
}
2626
.md-contact-name {
@@ -35,7 +35,7 @@ $contact-chip-name-width: rem(12) !default;
3535
height: ($contact-chip-suggestion-margin * 2) + $contact-chip-suggestion-image-height;
3636
img {
3737
height: $contact-chip-suggestion-image-height;
38-
border-radius: $contact-chip-suggestion-image-height / 2;
38+
border-radius: $contact-chip-suggestion-image-height * 0.5;
3939
margin-top: $contact-chip-suggestion-margin;
4040
}
4141
.md-contact-name {
@@ -87,7 +87,7 @@ md-chips {
8787

8888
md-chip {
8989
cursor: default;
90-
border-radius: $chip-height / 2;
90+
border-radius: $chip-height * 0.5;
9191
display: block;
9292
height: $chip-height;
9393
line-height: $chip-height;

src/components/datepicker/datePicker.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ md-datepicker {
6565
// down the error messages more than they should be.
6666
@include rtl(float, left, right);
6767
margin-top: $button-left-right-padding * -2;
68-
top: $button-left-right-padding * 2 - $md-datepicker-border-bottom-gap / 2;
68+
top: $button-left-right-padding * 2 - $md-datepicker-border-bottom-gap * 0.5;
6969
}
7070
}
7171

@@ -76,7 +76,7 @@ md-datepicker {
7676
&._md-datepicker-has-calendar-icon {
7777
> label:not(.md-no-float):not(.md-container-ignore) {
7878
$width-offset: $md-datepicker-triangle-button-width * 2 + $md-datepicker-button-gap;
79-
$offset: $md-datepicker-triangle-button-width / 2;
79+
$offset: $md-datepicker-triangle-button-width * 0.5;
8080
@include rtl(right, $offset, auto);
8181
@include rtl(left, auto, $offset);
8282
width: calc(100% - #{$width-offset});
@@ -92,8 +92,8 @@ md-datepicker {
9292
._md-datepicker-has-triangle-icon {
9393
// Leave room for the down-triangle button to "overflow" it's parent without modifying scrollLeft.
9494
// This prevents the element from shifting right when opening via the triangle button.
95-
@include rtl-prop(padding-right, padding-left, $md-datepicker-triangle-button-width / 2, 0);
96-
@include rtl-prop(margin-right, margin-left, -$md-datepicker-triangle-button-width / 2, auto);
95+
@include rtl-prop(padding-right, padding-left, $md-datepicker-triangle-button-width * 0.5, 0);
96+
@include rtl-prop(margin-right, margin-left, -$md-datepicker-triangle-button-width * 0.5, auto);
9797
}
9898

9999
// Container for the datepicker input.
@@ -194,7 +194,7 @@ md-datepicker {
194194
.md-datepicker-triangle-button {
195195
position: absolute;
196196
@include rtl-prop(right, left, 0, auto);
197-
bottom: -$md-date-arrow-size / 2;
197+
bottom: -$md-date-arrow-size * 0.5;
198198

199199
// TODO(jelbourn): This position isn't great on all platforms.
200200
@include rtl(transform, translateX(45%), translateX(-45%));

src/components/fabSpeedDial/fabSpeedDial.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ md-fab-speed-dial {
138138
transition: $swift-ease-in;
139139

140140
// Make the scale animation a bit faster since we are delaying each item
141-
transition-duration: $swift-ease-in-duration / 2.1;
141+
transition-duration: math.div($swift-ease-in-duration, 2.1);
142142
}
143143
}
144144
}

src/components/fabToolbar/fabToolbar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ md-fab-toolbar {
9999
transition: $swift-ease-in;
100100

101101
// Cut the action item's animation time in half since we delay it in the JS
102-
transition-duration: $swift-ease-in-duration / 2;
102+
transition-duration: $swift-ease-in-duration * 0.5;
103103
}
104104
}
105105

src/components/input/_input-variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $error-padding-top: $baseline-grid !default;
2323

2424
$icon-offset: 36px !default;
2525

26-
$icon-top-offset: ($icon-offset - $input-padding-top - $input-border-width-focused) / 4 !default;
26+
$icon-top-offset: ($icon-offset - $input-padding-top - $input-border-width-focused) * 0.25 !default;
2727

2828
$icon-float-focused-top: -8px !default;
2929

src/components/input/input.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ md-input-container {
354354

355355
.md-resize-handle {
356356
position: absolute;
357-
bottom: $input-resize-handle-height / -2;
357+
bottom: math.div($input-resize-handle-height, -2);
358358
left: 0;
359359
height: $input-resize-handle-height;
360360
background: transparent;

0 commit comments

Comments
 (0)