Skip to content

Commit caa124a

Browse files
committed
revert: undo removing hideScroll mixin from previous commit
1 parent 72c0168 commit caa124a

File tree

2 files changed

+35
-24
lines changed

2 files changed

+35
-24
lines changed

packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,17 @@
9696
transition: max-height $pl-animate-quick ease-out;
9797

9898
/**
99-
* Active is when accordion panel is open
100-
*/
99+
* Active styles for when the accordion panel is open
100+
* 1. WIP -- part of broader UI refactor
101+
*/
101102
&.pl-is-active {
102-
max-height: none;
103-
overflow: auto;
104103
@include hideScrollBar();
105-
106-
@media all and (min-width: $pl-bp-med) {
107-
max-height: 120rem;
108-
// WIP -- part of broader UI refactor
109-
max-height: calc(var(--pl-viewport-height) - 1rem, 120rem);
110-
}
104+
max-height: calc(100vh - #{$offset-top} - 1rem);
105+
max-height: calc(
106+
var(--pl-viewport-height) - 1rem,
107+
100vh - #{$offset-top} - 1rem
108+
); /* [1] */
109+
overflow: auto;
111110
}
112111
}
113112

packages/uikit-workshop/src/sass/scss/04-components/_navigation.scss

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
.pl-c-nav {
1111
background-color: inherit;
12-
1312
position: absolute;
1413
top: 100%;
1514
width: 100%;
@@ -20,18 +19,21 @@
2019
transition: max-height $pl-animate-quick ease-out;
2120

2221
/**
23-
* Active navigaiton
24-
* 1) Slide
25-
* 2) Set the height to the vierport height minus the height
26-
* of the header
27-
*/
22+
* Active navigaiton
23+
* 1) Slide
24+
* 2) Set the height to the vierport height minus the height
25+
* of the header
26+
*/
2827
&.pl-is-active {
29-
@include hideScrollBar;
30-
max-height: calc(100vh - #{$offset-top - 1rem}); /* 2 */
28+
max-height: calc(100vh - #{$offset-top} - 1rem); /* 2 */
3129
overflow: auto;
32-
3330
box-shadow: 0 1px 1px $pl-color-black;
3431

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+
}
36+
3537
.pl-c-body--theme-light & {
3638
box-shadow: 0 1px 1px darken($pl-color-gray-20, 15%);
3739
}
@@ -111,7 +113,7 @@
111113
*/
112114
.pl-c-nav__link--sublink {
113115
text-transform: none;
114-
padding-left: 1rem;
116+
padding-left: $pl-space / 2;
115117
}
116118

117119
/**
@@ -189,16 +191,26 @@
189191
* Dropdown sublist
190192
* 1) Set the height to the viewport height minus the height of the header
191193
*/
192-
.pl-c-nav__sublist--dropdown.pl-is-active {
194+
.pl-c-nav__sublist--dropdown.pl-is-active,
195+
.pl-c-nav__subsublist--dropdown.pl-is-active {
196+
margin-left: $pl-space / 2;
197+
193198
@media all and (min-width: $pl-bp-med) {
194199
height: auto;
195200
max-height: calc(100vh - #{$offset-top} - 1rem); /* 1 */
196201
}
202+
}
197203

198-
border: 1px solid $pl-color-black;
204+
.pl-c-nav__sublist--dropdown.pl-is-active {
205+
@media all and (min-width: $pl-bp-med) {
206+
margin-left: 0;
207+
border-width: 1px;
208+
border-style: solid;
209+
border-color: $pl-color-black;
199210

200-
.pl-c-body--theme-light & {
201-
border: 1px solid $pl-color-gray-20;
211+
.pl-c-body--theme-light & {
212+
border-color: $pl-color-gray-20;
213+
}
202214
}
203215
}
204216

0 commit comments

Comments
 (0)