Skip to content

Commit

Permalink
chore(sass): Removing warnings by updating the code (#3695)
Browse files Browse the repository at this point in the history
* chore(sass): Removing warnings by updating the code!

* chore(sass): Using color.mix in range.scss
  • Loading branch information
planctus authored Oct 28, 2024
1 parent 9918a8d commit 2c4e32f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

@use 'sass:map';
@use '@ecl/vanilla-layout-grid/mixins/breakpoints';

/* stylelint-disable-next-line scss/load-partial-extension, no-invalid-position-at-import-rule */
@import 'pikaday/scss/pikaday.scss';
@use 'pikaday/scss/pikaday';

// Exposed variables
$theme: null !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Breakpoints are defined as a map of (name: minimum width), order from small to l
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
// Makes the @content apply to the given breakpoint and wider.
@mixin up($name, $breakpoints: map.get($theme, 'breakpoint')) {
@if map_has_key($breakpoints, $name) {
@if map.has-key($breakpoints, $name) {
$min: ecl-min($name, $breakpoints);

@if $min {
Expand All @@ -90,7 +90,7 @@ Breakpoints are defined as a map of (name: minimum width), order from small to l
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
// Makes the @content apply to the given breakpoint and narrower.
@mixin down($name, $breakpoints: map.get($theme, 'breakpoint')) {
@if map_has_key($breakpoints, $name) {
@if map.has-key($breakpoints, $name) {
$max: ecl-max($name, $breakpoints);

@if $max {
Expand Down
5 changes: 2 additions & 3 deletions src/themes/ec/variables/_range.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@use 'sass:map';
@use 'sass:color';
@use '../index' as *;

// stylelint-disable scss/no-global-function-names
$range: (
bar-color: var(--c-n),
disabled-color: var(--c-n-60),
active-color: var(--c-p-160),
invalid-color: var(--c-er),
invalid-hover-color: var(--c-er),
invalid-active-color: mix(#da1e28, #26324b, 50%),
invalid-active-color: color.mix(#da1e28, #26324b, 50%),
value-color: var(--c-d),
value-font: var(--f-s),
range-margin-top: var(--s-xs),
Expand All @@ -19,4 +19,3 @@ $range: (
outline-color: var(--c-p-20),
outline-offset: 0,
);
// stylelint-enable scss/no-global-function-names

1 comment on commit 2c4e32f

@github-actions
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.