replace deprecated slash division with math division in Sass
Change-Id: I664c367e06eb166f74197ac50ef90dc24a7b5ef9
diff --git a/Changes b/Changes
index 04fe791..fb4a108 100755
--- a/Changes
+++ b/Changes
@@ -1,4 +1,4 @@
-0.43 2021-11-16
+0.43 2021-11-22
- New menu class that has an entry at the very end,
similar to the input text prefix,
that is always available. (lerepp)
@@ -49,6 +49,8 @@
- Fix "menu below hint marker" bug.
- HintMenu is now based on containerMenu instead of regular
menu (lerepp)
+ - Replace deprecated slash division in favor of math
+ division in Sass
0.42 2021-06-18
- Added GitHub based CI for perl.
diff --git a/dev/scss/base/flextable.scss b/dev/scss/base/flextable.scss
index dc5ffd9..f10cec3 100644
--- a/dev/scss/base/flextable.scss
+++ b/dev/scss/base/flextable.scss
@@ -1,3 +1,4 @@
+@use 'sass:math';
@import "lengths";
@import "mixins";
@@ -20,7 +21,7 @@
flex-direction: row;
text-align: center;
width: 100%;
- border-width: $border-size / 2;
+ border-width: math.div($border-size,2);
border-style: solid;
align-items: stretch;
> * {
diff --git a/dev/scss/base/lengths.scss b/dev/scss/base/lengths.scss
index 9dd307d..c4a7e5a 100644
--- a/dev/scss/base/lengths.scss
+++ b/dev/scss/base/lengths.scss
@@ -1,3 +1,5 @@
+@use 'sass:math';
+
/*
* Defined lengths and sizes for the
* Kalamar layout.
@@ -17,6 +19,6 @@
*/
$standard-margin: 40px;
$right-distance: $standard-margin;
-$right-view-distance: $standard-margin / 2;
+$right-view-distance: math.div($standard-margin,2);
$logo-left-distance: 230px;
-$footer-height: 100pt;
\ No newline at end of file
+$footer-height: 100pt;
diff --git a/dev/scss/base/mixins.scss b/dev/scss/base/mixins.scss
index 599c19a..88eaaae 100644
--- a/dev/scss/base/mixins.scss
+++ b/dev/scss/base/mixins.scss
@@ -1,3 +1,4 @@
+@use 'sass:math';
@import "colors";
/**
@@ -64,5 +65,5 @@
@mixin matchinfo-head {
border-top: $border-size solid $darker-orange; // #ff8000;
- width: $left-width / 2;
+ width: math.div($left-width, 2);
}
diff --git a/dev/scss/footer/footer.scss b/dev/scss/footer/footer.scss
index 76f2846..97cfce8 100644
--- a/dev/scss/footer/footer.scss
+++ b/dev/scss/footer/footer.scss
@@ -1,4 +1,5 @@
@charset "utf-8";
+@use 'sass:math';
@import "../util";
/**
@@ -73,12 +74,12 @@
*/
#ids-logo {
display: inline-block;
- width: (631 / 30) + em;
- height: (200 / 30) + em;
+ width: math.div(631,30) + em;
+ height: math.div(200,30) + em;
background-image: url('#{$img-path}/ids-institute-for-the-german-language-white.svg');
}
aside.active ~ footer {
padding-left: $logo-left-distance;
transition: all .3s ease-in-out;
-}
\ No newline at end of file
+}
diff --git a/dev/scss/header/header.scss b/dev/scss/header/header.scss
index 76c583e..c0c7469 100644
--- a/dev/scss/header/header.scss
+++ b/dev/scss/header/header.scss
@@ -1,4 +1,5 @@
@charset "utf-8";
+@use 'sass:math';
@import "../util";
@import "hint"; // Hint specific menu list
@import "containermenu"; // Container menu specific
@@ -86,7 +87,7 @@
top: 0;
right: 0;
margin-right: 0;
- width: ($standard-margin / 2);
+ width: math.div($standard-margin,2);
background-color: $dark-green;
text-align: center;
height: 100%;
diff --git a/dev/scss/main/main.scss b/dev/scss/main/main.scss
index e2bb6be..bf6e2dc 100644
--- a/dev/scss/main/main.scss
+++ b/dev/scss/main/main.scss
@@ -1,3 +1,4 @@
+@use 'sass:math';
@import "highlight"; // JSON highlighting
@import "kwic"; // Kwic view information
@import "logos"; // Logo images
@@ -21,11 +22,11 @@
main {
- padding-bottom: $footer-height + ($standard-margin / 2);
+ padding-bottom: $footer-height + math.div($standard-margin,2);
margin: {
left: $standard-margin;
- right: ($standard-margin / 2);
+ right: math.div($standard-margin,2);
}
&.embedded {
diff --git a/dev/scss/main/pagination.scss b/dev/scss/main/pagination.scss
index d09162d..f261fc7 100644
--- a/dev/scss/main/pagination.scss
+++ b/dev/scss/main/pagination.scss
@@ -1,4 +1,5 @@
@charset "utf-8";
+@use 'sass:math';
@import "../util";
/**
@@ -22,8 +23,8 @@
*/
position: fixed;
font-size: 0;
- right: ($standard-margin / 4);
- bottom: ($standard-margin / 2);
+ right: math.div($standard-margin,4);
+ bottom: math.div($standard-margin,2);
z-index: 35;
padding: 0;
height: auto;
diff --git a/dev/scss/main/view/matchtable.scss b/dev/scss/main/view/matchtable.scss
index 6239c61..ef01955 100644
--- a/dev/scss/main/view/matchtable.scss
+++ b/dev/scss/main/view/matchtable.scss
@@ -1,3 +1,4 @@
+@use 'sass:math';
@import "../../util";
/**
@@ -10,7 +11,7 @@
> div {
z-index: 20;
- margin-left: $left-distance - ($border-size / 2);
+ margin-left: $left-distance - math.div($border-size,2);
margin-right: $right-view-distance;
padding: 0;
overflow-x: auto;
@@ -86,13 +87,13 @@
}
> th:nth-of-type(2) {
- left: ($left-width / 2) + $border-size;
+ left: math.div($left-width,2) + $border-size;
}
// Includes header line as well
> * {
@include cell-info;
- border: ($border-size / 2) solid $dark-orange;
+ border: math.div($border-size,2) solid $dark-orange;
}
> td {
diff --git a/dev/scss/sidebar/sidebar.scss b/dev/scss/sidebar/sidebar.scss
index 01979b4..da6541f 100644
--- a/dev/scss/sidebar/sidebar.scss
+++ b/dev/scss/sidebar/sidebar.scss
@@ -1,4 +1,5 @@
@charset "utf-8";
+@use 'sass:math';
@import "../util";
aside {
@@ -41,7 +42,7 @@
padding: 6pt;
background-color: $dark-green;
border-top-right-radius: $standard-border-radius;
- margin-right: -1 * ($standard-margin / 2);
+ margin-right: -1 * math.div($standard-margin,2);
}
&.settings::after {
@@ -203,7 +204,7 @@
// Off aside
&.off,
&:not(:focus):not(.active) {
- margin-left: -1 * ($logo-left-distance - ($standard-margin / 2));
+ margin-left: -1 * ($logo-left-distance - math.div($standard-margin,2));
&::after {
opacity: 1;
}