Skip to content

Commit

Permalink
use math.div rather than deprecated /
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Jun 27, 2024
1 parent 052f1cd commit 26ec7bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions law-widget-styles/scss/mixins/_inlines.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:math";

@mixin inlines {
.akn-br {
display: block;
Expand Down Expand Up @@ -33,7 +35,7 @@
.akn-authorialNote {
display: flex;
font-size: small;
margin-top: $akn-para-spacing / 2;
margin-top: math.div($akn-para-spacing, 2);
padding: .25em 0.25em 0 .25em;
position: relative;
background-color: $akn-footnote-bg-colour;
Expand All @@ -58,7 +60,7 @@
}

& > .akn-authorialNote--marker {
margin-right: $akn-para-indent / 6;
margin-right: math.div($akn-para-indent, 6);
}
}

Expand Down
4 changes: 3 additions & 1 deletion law-widget-styles/scss/mixins/_structure.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@use "sass:math";

@function yiq-is-light($color, $threshold: 190) {
$red: red($color);
$green: green($color);
$blue: blue($color);

$yiq: (($red * 299) + ($green * 587) + ($blue * 114)) / 1000;
$yiq: math.div(($red * 299) + ($green * 587) + ($blue * 114), 1000);

@return if($yiq >= $threshold, true, false);
}
Expand Down

0 comments on commit 26ec7bf

Please sign in to comment.