Skip to content

Commit

Permalink
use map.get instead of map-get
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault committed Jan 15, 2025
1 parent a52ff49 commit ddf8d58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use 'sass:math';
@use 'sass:map';
@import 'spacing.tokens';

// prettier-ignore
Expand All @@ -12,7 +13,7 @@ $extra-rhythm: (
180: ($spacer * 180), // 180 unit - 1440px - 90 rem
);
@function extraRhythm($spacer-size) {
@return map-get($extra-rhythm, $spacer-size);
@return map.get($extra-rhythm, $spacer-size);
}

$breakpoint-small: extraRhythm(45);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'sass:map';

// Spacing
$spacer: 0.5rem !default; // 1 unit - 8px - 0.5rem
/* prettier-ignore */
Expand Down Expand Up @@ -31,11 +33,11 @@ $rhythm: (
) !default;

@function rhythm($spacer-size) {
@return map-get($rhythm, $spacer-size);
@return map.get($rhythm, $spacer-size);
}

@function rhythmRatio($spacer-size, $ratio) {
@return map-get($rhythm, $spacer-size) / $ratio;
@return map.get($rhythm, $spacer-size) / $ratio;
}

$border-radius-default: rhythm(0.5) !default;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'sass:map';

// Typography
$font-family-sans-serif:
Poppins,
Expand Down Expand Up @@ -41,7 +43,7 @@ $font-size: (
d3-md: ($font-size-base * 4.5), // 72px - 4.5 rem
) !default;
@function font-size($t-shirt-size) {
@return map-get($font-size, $t-shirt-size);
@return map.get($font-size, $t-shirt-size);
}
@mixin font-size($size) {
font-size: font-size($size);
Expand All @@ -63,7 +65,7 @@ $line-height: (
d3-md: ($font-size-base * 6), // 96px - 6 rem
) !default;
@function line-height($t-shirt-size) {
@return map-get($line-height, $t-shirt-size);
@return map.get($line-height, $t-shirt-size);
}
@mixin line-height($size) {
line-height: line-height($size);
Expand All @@ -85,7 +87,7 @@ $letter-spacing: (
decrease-m-md: -.09rem, // -0.09rem - -1.44px
) !default;
@function letter-spacing($t-shirt-size) {
@return map-get($letter-spacing, $t-shirt-size);
@return map.get($letter-spacing, $t-shirt-size);
}
@mixin letter-spacing($size) {
letter-spacing: letter-spacing($size);
Expand Down

0 comments on commit ddf8d58

Please sign in to comment.