Skip to content

Commit deda169

Browse files
committed
Fixes #7066: Migrate division statements in Sass from / to math.div
1 parent 94d2ad1 commit deda169

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

netbox/project-static/styles/netbox.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Netbox-specific Styles and Overrides.
22

33
@use 'sass:map';
4+
@use 'sass:math';
45
@import './sidenav';
56
@import './overrides';
67
@import './utilities';
@@ -746,7 +747,7 @@ label.required {
746747
div.bulk-buttons {
747748
display: flex;
748749
justify-content: space-between;
749-
margin: $spacer / 2 0;
750+
margin: math.div($spacer, 2) 0;
750751

751752
// Each group of buttons needs to be contained separately for alignment purposes. This way, you
752753
// can put some buttons in a group that aligns left, and other buttons in a group that aligns
@@ -777,7 +778,7 @@ div.bulk-buttons {
777778

778779
// However, the rest of the buttons should have spacing applied in all directions.
779780
> * {
780-
margin: $spacer / 4;
781+
margin: math.div($spacer, 4);
781782
}
782783
}
783784
}

netbox/project-static/styles/sidenav.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use 'sass:map';
2+
@use 'sass:math';
23

34
@mixin parent-link {
45
.navbar-nav .nav-item .nav-link[data-bs-toggle] {
@@ -164,7 +165,7 @@
164165
}
165166

166167
.nav-group-header {
167-
padding: $sidenav-link-spacing-y / 2 $sidenav-link-spacing-x;
168+
padding: math.div($sidenav-link-spacing-y, 2) $sidenav-link-spacing-x;
168169
margin-top: 0.5rem;
169170
margin-bottom: 0;
170171
}
@@ -184,9 +185,9 @@
184185

185186
@include child-link() {
186187
width: 100%;
187-
padding-top: $sidenav-link-spacing-y / 2;
188+
padding-top: math.div($sidenav-link-spacing-y, 2);
188189
padding-right: map.get($spacers, 1);
189-
padding-bottom: $sidenav-link-spacing-y / 2;
190+
padding-bottom: math.div($sidenav-link-spacing-y, 2);
190191
padding-left: $sidenav-link-spacing-x;
191192
margin-top: 0;
192193
margin-bottom: 0;
@@ -203,7 +204,7 @@
203204
@include parent-link() {
204205
width: unset;
205206
height: 100%;
206-
padding-left: $sidenav-link-spacing-x / 2;
207+
padding-left: math.div($sidenav-link-spacing-x, 2);
207208
font-weight: $font-weight-bold;
208209
color: var(--nbx-sidenav-parent-color);
209210

0 commit comments

Comments
 (0)