Skip to content

Commit ef2f164

Browse files
committed
refactor: replace inspect() with meta.inspect() and variable-exists() with meta.variable-exists()
1 parent 06ab8a9 commit ef2f164

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

scss/_root.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:meta";
12
@use "variables" as *;
23
@use "variables-dark" as *;
34
@use "maps" as *;
@@ -46,18 +47,18 @@
4647

4748
// Fonts
4849

49-
// Note: Use `inspect` for lists so that quoted items keep the quotes.
50+
// Note: Use `meta.inspect` for lists so that quoted items keep the quotes.
5051
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
51-
--#{$prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
52-
--#{$prefix}font-monospace: #{inspect($font-family-monospace)};
52+
--#{$prefix}font-sans-serif: #{meta.inspect($font-family-sans-serif)};
53+
--#{$prefix}font-monospace: #{meta.inspect($font-family-monospace)};
5354
--#{$prefix}gradient: #{$gradient};
5455

5556
// Root and body
5657
// scss-docs-start root-body-variables
5758
@if $font-size-root != null {
5859
--#{$prefix}root-font-size: #{$font-size-root};
5960
}
60-
--#{$prefix}body-font-family: #{inspect($font-family-base)};
61+
--#{$prefix}body-font-family: #{meta.inspect($font-family-base)};
6162
@include rfs($font-size-base, --#{$prefix}body-font-size);
6263
--#{$prefix}body-font-weight: #{$font-weight-base};
6364
--#{$prefix}body-line-height: #{$line-height-base};

scss/mixins/_grid.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "sass:map";
2+
@use "sass:meta";
23
@use "../variables" as *;
34
@use "../maps" as *;
45
@use "../functions/math" as *;
@@ -22,7 +23,7 @@
2223

2324
@mixin make-col-ready($include-column-box-sizing: false) {
2425
// Add box sizing if only the grid is loaded
25-
box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
26+
box-sizing: if(meta.variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
2627
// Prevent columns from becoming too narrow when at smaller grid tiers by
2728
// always setting `width: 100%;`. This works because we set the width
2829
// later on to override this initial width.

0 commit comments

Comments
 (0)