You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/uikit-workshop/src/sass/scss/04-components/_navigation.scss
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,9 @@
9
9
*/
10
10
.pl-c-nav {
11
11
@includeaccordionPanel;
12
-
background-color: inherit;
12
+
background-color: inherit;// allows the nav's children inherit from the parent header
13
13
position: absolute;
14
+
left: 0; // IE 11 layout broken
14
15
top: 100%;
15
16
width: 100%;
16
17
display: flex;
@@ -37,7 +38,9 @@
37
38
}
38
39
39
40
.pl-c-body--theme-sidebar& {
40
-
box-shadow: none;
41
+
@mediaalland (min-width: $pl-bp-med) {
42
+
box-shadow: none;
43
+
}
41
44
}
42
45
43
46
// if nav was opened on smaller screen and screen is resized, it'll be cut off otherwise
@@ -69,6 +72,7 @@
69
72
list-style: none;
70
73
flex-shrink: 0; // helps prevent top-level nav items from occasionally wrapping to multiple lines
71
74
order: 2;
75
+
background-color: inherit; // allows the nav's children inherit from the parent header
72
76
73
77
@mediaalland (min-width: $pl-bp-med) {
74
78
display: flex; /* 2 */
@@ -85,11 +89,17 @@
85
89
* Nav list item
86
90
*/
87
91
.pl-c-nav__item {
92
+
background-color: inherit; // allows the nav's children inherit from the parent header
93
+
transform: translateZ(0); // helps with more consistent rendering in Safari
88
94
cursor: pointer;
89
95
position: relative;
90
96
display: flex;
91
97
flex-direction: column;
92
98
justify-content: center; // vertically align nav items
99
+
100
+
.pl-c-body--theme-sidebar& {
101
+
display: block;
102
+
}
93
103
}
94
104
95
105
/**
@@ -107,9 +117,15 @@
107
117
* Nav link
108
118
*/
109
119
.pl-c-nav__link {
120
+
@includelinkStyle;
110
121
display: flex;
111
122
align-items: center;
112
-
@includelinkStyle();
123
+
margin: 0; // remove default button margin in Safari
124
+
125
+
// makes link layout / size more consistent in the sidebar layout, especially when display: flex styles are removed for more consistent IE 11 rendering
0 commit comments