Skip to content

Commit 651fcb5

Browse files
committed
💄 fix nav overflowing + not showing on chrome
1 parent a747965 commit 651fcb5

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

‎frontend/styles/header.scss

+10-12
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,22 @@ $c: map.get($container-max-widths, 'xxl');
6868
display: flex;
6969
flex-direction: column;
7070
gap: $spacer * 0.5 0;
71+
7172
position: absolute;
73+
width: calc(100% + var(--bs-gutter-x));
7274
top: calc(100% + $spacer + 1px); // to show the navbar border
7375
left: calc(var(--bs-gutter-x) * -0.5);
7476
right: calc(var(--bs-gutter-x) * -0.5);
77+
7578
background-color: var(--bs-body-bg);
76-
width: calc(100% + var(--bs-gutter-x));
79+
border-bottom: 3px var(--bs-blue-500) solid;
7780

7881
transition: clip-path 0.25s cubic-bezier(0, 0, 0.2, 1);
82+
clip-path: polygon(0 0, 100% 0%, 100% 0, 0 0);
7983

80-
clip-path: rect(0 0 0 100%);
81-
82-
transform-origin: top;
83-
border-bottom: 3px var(--bs-blue-500) solid;
84+
&.show {
85+
clip-path: polygon(0 0, 100% 0%, 100% 100%, 0% 100%);
86+
}
8487

8588
li {
8689
padding: 0 var(--bs-gutter-x);
@@ -89,19 +92,14 @@ $c: map.get($container-max-widths, 'xxl');
8992
ul li {
9093
padding: 0 calc(0.75 * var(--bs-gutter-x));
9194
}
92-
93-
&.show {
94-
clip-path: rect(0 0 100% 100%);
95-
//transform: translateY(0);
96-
}
9795
}
9896

9997
&::before {
10098
position: absolute;
10199
z-index: 1045;
102100
left: 0;
103101
right: 0;
104-
top: 100%;
102+
top: calc(100% + 1px); // to show the navbar border
105103
height: 100vh;
106104
background-color: var(--bs-body-color);
107105
opacity: 0;
@@ -176,7 +174,7 @@ $c: map.get($container-max-widths, 'xxl');
176174
content: '';
177175
position: absolute;
178176
top: 0;
179-
left: calc(calc(100vw - 100%) / -2);
177+
left: calc((100vw - 100% + 1rem) / -2);
180178
right: 0;
181179
width: 100vw;
182180
background-color: var(--bs-border-color-translucent);

0 commit comments

Comments
 (0)