Skip to content

Commit 5cf9424

Browse files
committed
fix: deprecated Sass global built-in functions
1 parent 19d96c0 commit 5cf9424

6 files changed

Lines changed: 26 additions & 16 deletions

File tree

src/main/webapp/sass/_cal-heapmap.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
@use "sass:color";
2+
13
:root {
2-
--heatmap-empty: #{grayscale(adjust-color($heatmap_max, $lightness: -20%*$heatmap_scale))};
3-
--heatmap-q1: #{adjust-color($heatmap_max, $lightness: -20%*$heatmap_scale)};
4-
--heatmap-q2: #{adjust-color($heatmap_max, $lightness: -15%*$heatmap_scale)};
5-
--heatmap-q3: #{adjust-color($heatmap_max, $lightness: -10%*$heatmap_scale)};
6-
--heatmap-q4: #{adjust-color($heatmap_max, $lightness: -5%*$heatmap_scale)};
4+
--heatmap-empty: #{color.grayscale(color.adjust($heatmap_max, $lightness: -20%*$heatmap_scale))};
5+
--heatmap-q1: #{color.adjust($heatmap_max, $lightness: -20%*$heatmap_scale)};
6+
--heatmap-q2: #{color.adjust($heatmap_max, $lightness: -15%*$heatmap_scale)};
7+
--heatmap-q3: #{color.adjust($heatmap_max, $lightness: -10%*$heatmap_scale)};
8+
--heatmap-q4: #{color.adjust($heatmap_max, $lightness: -5%*$heatmap_scale)};
79
--heatmap-max: #{$heatmap_max};
810
}
911

src/main/webapp/sass/_grid.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $class_push: 'push'; // //
4545
@if ($total_width == 100%){
4646
$not_rounded_value: (math.div(100% + $gutter_width, $total_columns)*$column_index)-$gutter_width;
4747
$not_rounded_value: $not_rounded_value * 100;
48-
$rounded_value: round($not_rounded_value)*0.01;
48+
$rounded_value: math.round($not_rounded_value)*0.01;
4949
@return $rounded_value;
5050
}@else{
5151
@return (math.div($total_width + $gutter_width, $total_columns)*$column_index)-$gutter_width;
@@ -56,7 +56,7 @@ $class_push: 'push'; // //
5656
@if ($total_width == 100%){
5757
$not_rounded_value: (math.div(100 + $gutter_width, $total_columns))-$gutter_width;
5858
$not_rounded_value: $not_rounded_value * 100;
59-
$rounded_value: round($not_rounded_value)*0.01;
59+
$rounded_value: math.round($not_rounded_value)*0.01;
6060
@return $rounded_value * 1%;
6161
}@else{
6262
@return math.div($total_width - ($gutter_width*($total_columns - 1)), $total_columns);
@@ -183,7 +183,7 @@ $class_push: 'push'; // //
183183

184184
@mixin generate_grid_positions($_column_selector, $_element_width){
185185

186-
$_cols_per_row: floor(math.div($total_columns, $_element_width));
186+
$_cols_per_row: math.floor(math.div($total_columns, $_element_width));
187187

188188
// create rule for each element
189189
@for $i from 1 through $_cols_per_row{
@@ -204,7 +204,7 @@ $class_push: 'push'; // //
204204

205205
@mixin generate_grid_positions_legacy($_column_selector, $_element_width, $_elements_in_grid:$total_columns){
206206

207-
$_cols_per_row: floor(math.div($total_columns, $_element_width));
207+
$_cols_per_row: math.floor(math.div($total_columns, $_element_width));
208208
$_current_col:1;
209209

210210
// create rule for each element

src/main/webapp/sass/tango/auto.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16+
@use "sass:color";
17+
1618
$heatmap_max: #73d216;
1719
$heatmap_scale: 1.5;
1820

@@ -45,10 +47,10 @@ $heatmap_scale: 1.5;
4547
--preview-border-color: #c4a000;
4648

4749
--heatmap-empty: #babdb6;
48-
--heatmap-max: #{adjust-color($heatmap_max, $lightness: -20%*$heatmap_scale)};
49-
--heatmap-q4: #{adjust-color($heatmap_max, $lightness: -15%*$heatmap_scale)};
50-
--heatmap-q3: #{adjust-color($heatmap_max, $lightness: -10%*$heatmap_scale)};
51-
--heatmap-q2: #{adjust-color($heatmap_max, $lightness: -5%*$heatmap_scale)};
50+
--heatmap-max: #{color.adjust($heatmap_max, $lightness: -20%*$heatmap_scale)};
51+
--heatmap-q4: #{color.adjust($heatmap_max, $lightness: -15%*$heatmap_scale)};
52+
--heatmap-q3: #{color.adjust($heatmap_max, $lightness: -10%*$heatmap_scale)};
53+
--heatmap-q2: #{color.adjust($heatmap_max, $lightness: -5%*$heatmap_scale)};
5254
--heatmap-q1: #{$heatmap_max};
5355

5456
.swiffy-slider {

src/main/webapp/sass/waltz/_colors.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16+
@use "sass:color";
17+
1618
$main_background: #ECECEC;
1719
$text_color: #000;
1820
$link_color: #275096;
@@ -48,7 +50,7 @@ $tagpage_group_label_background: #E7AF55;
4850
$tagpage_group_label_color: $table_link_color;
4951
$stars_color: #465A48;
5052

51-
$heatmap_max: darken(#8ae234, 15%);
53+
$heatmap_max: color.adjust(#8ae234, $lightness: -15%);
5254
$heatmap_scale: -1.5;
5355
$tracker_tag_color: $table_border_color;
5456

src/main/webapp/sass/white2/style.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16+
@use "sass:color";
17+
1618
@import "../common";
1719

1820
$main_background: white;
@@ -279,7 +281,7 @@ textarea {
279281

280282
@import "../responsive";
281283

282-
$heatmap_max: darken(#8ae234, 15%);
284+
$heatmap_max: color.adjust(#8ae234, $lightness: -15%);
283285
$heatmap_scale: -1.5;
284286
@import "../cal-heapmap";
285287
@import "../tracker";

src/main/webapp/sass/zomg_ponies/_colors.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* limitations under the License.
1414
*/
1515

16+
@use "sass:color";
17+
1618
$main_background: #FFDFFF;
1719
$text_color: #000;
1820
$link_color: #000040;
@@ -51,7 +53,7 @@ $stars_color: #400040;
5153

5254
$icon_button_active_color: $stars_color;
5355

54-
$heatmap_max: darken(#8ae234, 15%);
56+
$heatmap_max: color.adjust(#8ae234, $lightness: -15%);
5557
$heatmap_scale: -1.5;
5658
$tracker_tag_color: $tag_even_color;
5759

0 commit comments

Comments
 (0)