Use multiplications instead of divisions in Sass variables
In the previous commit, we used the `calc` function when assiging CSS properties in order to avoid warnings like: ``` Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0. Recommendation: math.div($global-width, 2) or calc($global-width / 2) ``` In cases like dividing by two, there's a third alternative: multiplying by 0.5. We're applying this principle to all variable assignments where we were using divisions, since using the `calc` function here would sometimes result in errors due to these variables being used in arithmetical operations. We aren't using `math.div` because it makes the code harder to read.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.admin .budgets-actions {
|
||||
> * {
|
||||
$gap: $line-height;
|
||||
$vertical-gap: $line-height / 2;
|
||||
$vertical-gap: $line-height * 0.5;
|
||||
@include flex-with-gap($gap);
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.admin .drafting {
|
||||
$vertical-gap: nth($callout-margin, 3);
|
||||
@include flex-with-gap($line-height / 2);
|
||||
@include flex-with-gap($line-height * 0.5);
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: $line-height * 1.5;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.admin .budgets-help {
|
||||
$padding: $line-height / 2;
|
||||
$padding: $line-height * 0.5;
|
||||
$quote-size: 1em;
|
||||
$quote-padding: 2 * $quote-size / 5;
|
||||
$quote-padding: $quote-size * 0.4;
|
||||
$quote-width: $quote-size + 2 * $quote-padding;
|
||||
|
||||
@include has-fa-icon(quote-right, solid, after);
|
||||
|
||||
Reference in New Issue
Block a user