Skip to content

Commit 3613a7c

Browse files
author
Dobromir Hristov
committed
refactor: extract nav wide padding
1 parent add0382 commit 3613a7c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/NavBase.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ $content-max-width: map-deep-get($breakpoint-attributes, (nav, large, content-wi
320320
width: 100%;
321321
height: $nav-height;
322322
z-index: 9997;
323+
--nav-padding: #{$nav-padding};
323324
324325
@include breakpoint(small, $scope: nav) {
325326
min-width: map-deep-get($breakpoint-attributes, (nav, small, min-width));
@@ -333,6 +334,10 @@ $content-max-width: map-deep-get($breakpoint-attributes, (nav, large, content-wi
333334
color: var(--color-nav-dark-color);
334335
}
335336
337+
@include nav-is-wide-format($nested: true) {
338+
--nav-padding: #{$nav-padding-wide};
339+
}
340+
336341
&__wrapper {
337342
position: absolute;
338343
top: 0;
@@ -519,7 +524,6 @@ $content-max-width: map-deep-get($breakpoint-attributes, (nav, large, content-wi
519524
520525
// Nav content (title and menus)
521526
.nav-content {
522-
--nav-padding: #{$nav-padding};
523527
display: flex;
524528
padding: 0 var(--nav-padding);
525529
max-width: $content-max-width;
@@ -530,7 +534,6 @@ $content-max-width: map-deep-get($breakpoint-attributes, (nav, large, content-wi
530534
box-sizing: border-box;
531535
532536
@include nav-is-wide-format() {
533-
--nav-padding: 30px;
534537
@include breakpoint-full-width-container()
535538
}
536539

src/styles/core/_nav.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $nav-height: rem(52px);
1313
$nav-height-small: rem(48px);
1414
$nav-padding: rem(22px);
1515
$nav-padding-small: rem(16px);
16+
$nav-padding-wide: rem(30px);
1617
$nav-menu-item-left-margin: rem(24px);
1718
$nav-timingfunction: ease-in !default;
1819
$nav-menu-tray-transition: max-height 0.4s $nav-timingfunction 0s, visibility 0s linear 1s !default;

0 commit comments

Comments
 (0)