Files
grecia/app/assets/stylesheets/admin/budgets_wizard/creation_timeline.scss
Javi Martín 6df813fdb6 Use calc() where divisions are involved
The division operator `/` from Sass is deprecated because `/` is used in
CSS for uses other than dividing numbers. That's why we were getting
many 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($line-height, 2) or calc($line-height / 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

margin-top: $line-height / 2;
```

Since using math.div makes the code harder to read and `calc` is
universally supported by all browsers (although the implementation in
Internet Explorer doesn't work in certain cases), we're using `calc`
when assigning the value to a CSS property.

However, we're also using divisions when assigning Sass variables, and
in those cases using `calc` is trickier because sometimes these
variables are used in other operations. We'll handle these cases in the
next commit.
2024-04-04 15:16:24 +02:00

35 lines
710 B
SCSS

.creation-timeline {
display: flex;
list-style-type: none;
margin: $line-height * 2 0;
position: relative;
li {
@include brand-border(top, 4px);
display: inline-block;
font-size: $small-font-size;
font-weight: bold;
padding: calc(#{$line-height} / 2) $line-height * 3 0;
text-transform: uppercase;
&::before {
@include brand-background;
border-radius: 50%;
content: "";
height: 20px;
margin-left: calc(#{$line-height} / 2);
position: absolute;
top: -8px;
width: 20px;
}
&[aria-current] ~ * {
border-color: $admin-border-color;
&::before {
background: $admin-border-color;
}
}
}
}