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:
Javi Martín
2024-03-27 21:37:27 +01:00
parent 6df813fdb6
commit 1a797f2808
12 changed files with 18 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
.ballot-list li {
$side-padding: $line-height / 2;
$side-padding: $line-height * 0.5;
$close-icon-size: rem-calc(20);
$close-icon-margin: rem-calc(6);