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.
73 lines
1.0 KiB
SCSS
73 lines
1.0 KiB
SCSS
.admin .groups-and-headings {
|
|
$gap: rem-calc(map-get($grid-column-gutter, medium));
|
|
@include admin-action-icons;
|
|
|
|
> section + section {
|
|
margin-top: $line-height * 1.5;
|
|
}
|
|
|
|
dt,
|
|
dd {
|
|
display: inline;
|
|
}
|
|
|
|
dt {
|
|
font-weight: normal;
|
|
}
|
|
|
|
dd {
|
|
font-weight: bold;
|
|
}
|
|
|
|
th:last-child {
|
|
text-align: $global-right;
|
|
}
|
|
|
|
.table-actions {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.groups-actions {
|
|
@include flex-with-gap($gap);
|
|
align-items: flex-start;
|
|
|
|
+ * {
|
|
margin-top: calc(#{$line-height} / 2);
|
|
}
|
|
|
|
.edit-link,
|
|
.destroy-link {
|
|
@include icon-on-top;
|
|
}
|
|
|
|
.new-link {
|
|
@include hollow-button;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
> :nth-last-child(2) {
|
|
margin-#{$global-right}: $gap;
|
|
}
|
|
|
|
> :last-child {
|
|
margin-#{$global-left}: auto;
|
|
}
|
|
|
|
button {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
.new-link {
|
|
@include has-fa-icon(plus-square, solid);
|
|
|
|
&::before {
|
|
margin-#{$global-right}: $font-icon-margin;
|
|
}
|
|
}
|
|
|
|
> .new-link {
|
|
@include regular-button;
|
|
}
|
|
}
|