Skip to content

Commit

Permalink
Prevent using global built-in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
marshallku committed Oct 24, 2024
1 parent 26118a9 commit 377b991
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui/src/styles/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use "sass:meta";
@use "sass:map";
@use "sass:string";

$breakpoints: (
"small": (
Expand All @@ -20,7 +21,7 @@ $breakpoints: (
$raw-query: map.get($breakpoints, $breakpoint);

@if $raw-query {
$query: if(meta.type-of($raw-query) == "string", unquote($raw-query), inspect($raw-query));
$query: if(meta.type-of($raw-query) == "string", string.unquote($raw-query), meta.inspect($raw-query));

@media screen and (#{$query}) {
@content;
Expand Down

1 comment on commit 377b991

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual regression test result - success

Component Story Success Viewport MisMatch Percentage
components-button string-children phone 0.00%
components-button string-children tablet 0.09%
input-input default phone 0.00%
input-input default tablet 0.00%
input-input line phone 0.00%
input-input line tablet 0.00%
input-input box phone 0.00%
input-input box tablet 0.00%
input-textarea line phone 0.00%
input-textarea line tablet 0.00%
input-textarea box phone 0.00%
input-textarea box tablet 0.00%
typography-typography default phone 0.00%
typography-typography default tablet 0.00%

Please sign in to comment.