|
8 | 8 | * activates nav
|
9 | 9 | */
|
10 | 10 | .pl-c-nav {
|
| 11 | + @include accordionPanel; |
11 | 12 | background-color: inherit;
|
12 | 13 | position: absolute;
|
13 | 14 | top: 100%;
|
14 | 15 | width: 100%;
|
15 |
| - overflow: hidden; |
16 |
| - max-height: 0; /* 1 */ |
17 | 16 | display: flex;
|
18 | 17 | flex-direction: column;
|
19 | 18 | transition: max-height $pl-animate-quick ease-out;
|
20 | 19 |
|
| 20 | + // if nav was opened on smaller screen and screen is resized, it'll be cut off otherwise |
| 21 | + @media all and (min-width: $pl-bp-med) { |
| 22 | + overflow: visible; |
| 23 | + max-height: none; |
| 24 | + } |
| 25 | + |
21 | 26 | /**
|
22 | 27 | * Active navigaiton
|
23 | 28 | * 1) Slide
|
24 | 29 | * 2) Set the height to the vierport height minus the height
|
25 | 30 | * of the header
|
26 | 31 | */
|
27 | 32 | &.pl-is-active {
|
28 |
| - max-height: calc(100vh - #{$offset-top} - 1rem); /* 2 */ |
29 |
| - overflow: auto; |
30 | 33 | box-shadow: 0 1px 1px $pl-color-black;
|
31 | 34 |
|
32 |
| - // if nav was opened on smaller screen and screen is resized, it'll be cut off otherwise |
33 |
| - @media all and (min-width: $pl-bp-med) { |
34 |
| - overflow: visible; |
| 35 | + .pl-c-body--theme-light & { |
| 36 | + box-shadow: 0 1px 1px darken($pl-color-gray-20, 15%); |
35 | 37 | }
|
36 | 38 |
|
37 | 39 | .pl-c-body--theme-sidebar & {
|
38 |
| - overflow: hidden; |
| 40 | + box-shadow: none; |
39 | 41 | }
|
40 | 42 |
|
41 |
| - .pl-c-body--theme-light & { |
42 |
| - box-shadow: 0 1px 1px darken($pl-color-gray-20, 15%); |
| 43 | + // if nav was opened on smaller screen and screen is resized, it'll be cut off otherwise |
| 44 | + @media all and (min-width: $pl-bp-med) { |
| 45 | + overflow: visible; |
| 46 | + max-height: none; |
43 | 47 | }
|
44 | 48 | }
|
45 | 49 |
|
|
48 | 52 | position: relative;
|
49 | 53 | top: auto;
|
50 | 54 | width: auto;
|
51 |
| - overflow: visible; |
52 |
| - max-height: none; |
53 | 55 | box-shadow: none;
|
54 | 56 | }
|
55 | 57 | }
|
|
154 | 156 | background-color: $pl-color-gray-87;
|
155 | 157 |
|
156 | 158 | /**
|
157 |
| - * Caret rotation and positioning in active dropdown |
158 |
| - */ |
| 159 | + * Caret rotation and positioning in active dropdown |
| 160 | + */ |
159 | 161 | &:after {
|
160 | 162 | color: $pl-color-gray-50;
|
161 | 163 | transform: rotate(180deg);
|
|
176 | 178 | top: 100%; /* 1 */
|
177 | 179 | left: 0;
|
178 | 180 | min-width: 10rem;
|
179 |
| - overflow: hidden; |
180 | 181 | border-bottom-left-radius: $pl-border-radius-med;
|
181 | 182 | border-bottom-right-radius: $pl-border-radius-med;
|
182 | 183 | }
|
|
200 | 201 | .pl-c-nav__subsublist--dropdown.pl-is-active {
|
201 | 202 | margin-left: $pl-space / 2;
|
202 | 203 | visibility: visible;
|
| 204 | + max-height: none; |
203 | 205 |
|
204 | 206 | @media all and (min-width: $pl-bp-med) {
|
205 | 207 | height: auto;
|
206 | 208 | max-height: calc(100vh - #{$offset-top} - 1rem); /* 1 */
|
207 | 209 | }
|
208 | 210 |
|
209 | 211 | .pl-c-body--theme-sidebar & {
|
210 |
| - overflow: hidden; |
211 | 212 | max-height: none;
|
212 | 213 | }
|
213 | 214 | }
|
|
0 commit comments