Skip to content

Commit

Permalink
[BUGFIX] removed calc inside clamp, which is unneeded and causes CSSN…
Browse files Browse the repository at this point in the history
…ANO to fail
  • Loading branch information
yairEO committed Feb 4, 2021
1 parent d5a4406 commit f544109
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
13 changes: 5 additions & 8 deletions ui-range.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions ui-range.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@
// "calc" is used to inflat the outcome into a huge number, to get rid of any value between -1 & 1
// if absolute diff of both completed % is above "5" (%)
// ".001" bumps the value just a bit, to avoid a scenario where calc resulted in "0" (then clamp will also be "0")
--thumbs-too-close: Clamp(-1, calc(1000 * (Min(1, Max(var(--cb) - var(--ca) - 5, -1)) + .001) ), 1);
--thumb-close-to-min: Min(1, Max(var(--ca) - 2, 0)); // 2% threshold
--thumb-close-to-max: Min(1, Max(98 - var(--cb), 0)); // 2% threshold
--thumbs-too-close: Clamp(
-1,
1000 * (Min(1, Max(var(--cb) - var(--ca) - 5, -1)) + 0.001),
1
);
--thumb-close-to-min: Min(1, Max(var(--ca) - 5, 0)); // 2% threshold
--thumb-close-to-max: Min(1, Max(95 - var(--cb), 0)); // 2% threshold

@mixin thumb{
appearance: none;
Expand Down

0 comments on commit f544109

Please sign in to comment.