Skip to content

Commit 0bf85c8

Browse files
committed
fix selector for page versions when version overflows
1 parent 6eebb02 commit 0bf85c8

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/css/page-versions.css

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
@media screen and (min-width: 1024px) {
99
.page-versions {
10-
display: block;
10+
display: flex;
11+
justify-content: flex-end;
1112
}
1213
}
1314

@@ -24,14 +25,22 @@
2425
z-index: var(--z-index-page-version-menu);
2526
}
2627

27-
.page-versions .version-menu {
28-
border: 1px solid transparent;
28+
.page-versions.is-active .version-menu-toggle {
2929
background-color: var(--page-version-menu-background);
30+
}
31+
32+
.page-versions .version-menu {
33+
flex: 1 1 auto;
34+
display: flex;
35+
min-width: 100%;
36+
flex-direction: column;
37+
background: linear-gradient(to bottom, var(--page-version-menu-background) 0%, var(--page-version-menu-background) 100%) no-repeat;
38+
background-position: 100% 1.75em;
3039
padding: 1.25rem 0.5rem 0.5rem;
3140
position: absolute;
3241
top: 0;
33-
left: 0;
34-
width: 100%;
42+
right: 0;
43+
white-space: nowrap;
3544
}
3645

3746
.page-versions:not(.is-active) .version-menu {
@@ -43,6 +52,10 @@
4352
padding-top: 0.5rem;
4453
}
4554

55+
.page-versions .version:first-child {
56+
margin-top: 0.25rem;
57+
}
58+
4659
.page-versions .version.is-current {
4760
display: none;
4861
}

0 commit comments

Comments
 (0)