Skip to content

Commit 942ed0f

Browse files
committed
Calculate proper height for flex items; fixes #63
I have no idea what I've done in this commit
1 parent b104290 commit 942ed0f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

css/kunai/site/sidebar.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ main[role="main"] .kunai-sidebar.force-legacy {
8585
font-size: 1rem;
8686
display: flex;
8787
flex-direction: column;
88+
height: 100%;
8889

8990
a {
9091
&:link, &:visited {
@@ -151,6 +152,7 @@ main[role="main"] .kunai-sidebar.force-legacy {
151152
$cl-list-hover: color(#f0f0fd alpha(.9));
152153

153154
display: flex;
155+
height: 100%;
154156

155157
flex-direction: column;
156158
margin: 0;
@@ -160,7 +162,7 @@ main[role="main"] .kunai-sidebar.force-legacy {
160162
font-family: sans-serif;
161163
line-height: 1.5;
162164

163-
height: 100%;
165+
overflow: hidden;
164166

165167
.kunai-branch {
166168
overflow: hidden;
@@ -275,15 +277,14 @@ main[role="main"] .kunai-sidebar.force-legacy {
275277
display: flex;
276278
flex-direction: column;
277279

278-
height: 100%;
279-
280280
> li.stack {
281281
display: flex;
282282
flex-direction: column;
283283
align-content: flex-start;
284284
box-sizing: border-box;
285285

286286
flex-shrink: 0;
287+
flex-grow: 0;
287288

288289
border-top: 1px solid transparent;
289290
border-bottom: 1px solid transparent;
@@ -295,10 +296,9 @@ main[role="main"] .kunai-sidebar.force-legacy {
295296
}
296297

297298
&.expanded:not(.empty) {
298-
flex-grow: 1;
299-
flex-shrink: 1;
300-
301299
$b: #DDD;
300+
overflow: hidden;
301+
flex-shrink: 1;
302302

303303
&:not(:first-child) {
304304
border-top-color: $b;
@@ -349,7 +349,7 @@ main[role="main"] .kunai-sidebar.force-legacy {
349349
> .content-wrapper {
350350
display: flex;
351351
flex-direction: column;
352-
flex-grow: 1;
352+
// flex-grow: 1;
353353

354354
> .content {
355355
display: flex;
@@ -396,6 +396,8 @@ main[role="main"] .kunai-sidebar.force-legacy {
396396
> ul.root {
397397
display: flex;
398398
flex-direction: column;
399+
height: 100%;
400+
overflow: hidden;
399401

400402
flex-shrink: 0;
401403

0 commit comments

Comments
 (0)