Skip to content

Commit 4399c8d

Browse files
Modernize shared Sass helpers
1 parent 7c5f1da commit 4399c8d

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

styles/global.scss

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:math';
2+
13
@import url(https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i);
24

35
// VARIABLES
@@ -26,19 +28,19 @@ $venice-blue: #075a7f;
2628
$dark-blue: #091721;
2729

2830
$colors: (
29-
black: $black,
30-
white: $white,
31-
pacific-blue-1: $pacific-blue-1,
32-
picton-blue: $picton-blue,
33-
allports: $allports,
34-
blizzard-blue: $blizzard-blue,
35-
astronaut-blue: $astronaut-blue,
36-
venice-blue: $venice-blue,
37-
dark-blue: $dark-blue
31+
'black': $black,
32+
'white': $white,
33+
'pacific-blue-1': $pacific-blue-1,
34+
'picton-blue': $picton-blue,
35+
'allports': $allports,
36+
'blizzard-blue': $blizzard-blue,
37+
'astronaut-blue': $astronaut-blue,
38+
'venice-blue': $venice-blue,
39+
'dark-blue': $dark-blue
3840
);
3941

4042
@function rem($pixels, $size: $base-font-size) {
41-
@return $pixels / ($size / (1rem * 1));
43+
@return math.div($pixels, math.div($size, 1rem));
4244
}
4345

4446
%gray-arrow-right {

styles/partials/_base.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:color';
2+
13
// scss-lint:disable ColorVariable
24

35
$font-color-heading: #091721;
@@ -36,7 +38,7 @@ a {
3638
text-decoration: none;
3739

3840
&:hover {
39-
color: darken($link-color, 10%);
41+
color: color.adjust($link-color, $lightness: -10%);
4042
text-decoration: none;
4143
}
4244
}

0 commit comments

Comments
 (0)