Skip to content

Commit 61b6489

Browse files
authored
feat: Resolve deprecation notices (global built-in functions) (#72)
## Description There are a large number of deprecation notices being shown due to incoming changes in SASS. This change addresses the notices relating to global built-in functions. ## Issue https://jira.dev.bbc.co.uk/browse/GEL
1 parent c29f3f6 commit 61b6489

File tree

5 files changed

+270
-12
lines changed

5 files changed

+270
-12
lines changed

_typography.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:map';
2+
13
///*------------------------------------*\
24
// # GEL TYPOGRAPHY
35
//\*------------------------------------*/
@@ -20,7 +22,7 @@ $enhanced: true !default;
2022

2123
// If larger font sizes enable, merge them with gel-type-settings
2224
@if $gel-type-enable--larger-type-sizes {
23-
$gel-type-settings: map-merge($gel-type-settings, $gel-larger-font-sizes);
25+
$gel-type-settings: map.merge($gel-type-settings, $gel-larger-font-sizes);
2426
}
2527

2628
// Output the typography styles for the 4 groups

lib/_settings.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:meta';
2+
13
///*------------------------------------*\
24
// # GEL TYPOGRAPHY - SETTINGS
35
//\*------------------------------------*/
@@ -412,7 +414,7 @@ $gel-larger-font-sizes: (
412414
// Adds the typography specific breakpoints to the Sass MQ list
413415
// of breakpoints
414416
//
415-
@if (mixin-exists(mq)) {
417+
@if (meta.mixin-exists(mq)) {
416418
@include mq-add-breakpoint(gel-bp-type-b, 320px);
417419
@include mq-add-breakpoint(gel-bp-type-c, 600px);
418420
} @else {

lib/_tools.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:map';
2+
13
///*------------------------------------*\
24
// # GEL TYPOGRAPHY - TOOL
35
//\*------------------------------------*/
@@ -44,10 +46,10 @@
4446

4547
@if map-has-key($source, $key) {
4648
$current: map-get($source, $key);
47-
$new: ($key: map-merge($current, $value));
49+
$new: ($key: map.merge($current, $value));
4850
}
4951

50-
$source: map-merge($source, $new);
52+
$source: map.merge($source, $new);
5153
}
5254

5355
@return $source;

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gel-typography",
3-
"version": "5.1.2",
3+
"version": "5.2.0",
44
"description": "A flexible code implementation of the GEL Typography",
55
"main": "_typography.scss",
66
"scripts": {
@@ -42,6 +42,6 @@
4242
"sass-mq": "6.0.0"
4343
},
4444
"dependencies": {
45-
"gel-sass-tools": "3.3.0"
45+
"gel-sass-tools": "3.4.0"
4646
}
4747
}

0 commit comments

Comments
 (0)