Skip to content

Commit cc0b8d0

Browse files
committed
extract centered title bar to snippet, add fades and better centering
1 parent 3720b58 commit cc0b8d0

File tree

4 files changed

+58
-25
lines changed

4 files changed

+58
-25
lines changed

preview-hovers.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* reasonably sized hovers */
22
.popover.hover-popover {
33
width: 30rem !important;
4+
overflow: scroll;
45
}
56
.popover.hover-popover .markdown-embed {
67
height: fit-content;

preview-vertical.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
push down: 40 + 20 - (20/2) = 50
77
*/
88
padding-bottom: 20vh !important;
9-
transform: translateY(clamp(0px, calc(50vh - 50%), 40vh));
9+
transform: translateY(clamp(0px, calc(50vh - 45%), 40vh));
1010
}

theme-minimal.css

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,6 @@
1515
opacity: 1 !important;
1616
}
1717

18-
.view-header-icon {
19-
opacity: 0.25;
20-
transition: opacity 0.25s ease-in-out;
21-
}
22-
.focus-mode .view-header-icon {
23-
opacity: 0;
24-
}
25-
.view-header-icon:hover {
26-
color: var(--text-muted);
27-
opacity: 1 !important;
28-
}
29-
.view-header-title-container {
30-
position: absolute;
31-
width: 100%;
32-
}
33-
.view-header-title {
34-
font-size: 0.9rem;
35-
opacity: 0.75;
36-
text-align: center;
37-
padding-left: 1.5rem !important;
38-
padding-right: 1.5rem !important;
39-
position: relative;
40-
}
41-
4218
.workspace-ribbon-collapse-btn {
4319
padding: 20px 6px;
4420
}

view-centered-header.css

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.view-header-icon {
2+
opacity: 0.25;
3+
transition: opacity 0.25s ease-in-out;
4+
}
5+
.focus-mode .view-header-icon {
6+
opacity: 0;
7+
}
8+
.view-header-icon:hover {
9+
color: var(--text-muted);
10+
opacity: 1 !important;
11+
}
12+
.view-header-title-container {
13+
position: absolute;
14+
width: 100%;
15+
height: 100%;
16+
}
17+
.view-header-title {
18+
font-size: 0.9rem;
19+
opacity: 0.75;
20+
21+
display: flex;
22+
height: 100%;
23+
position: relative;
24+
align-items: center;
25+
justify-content: center;
26+
27+
padding-left: 1.5rem !important;
28+
padding-right: 1.5rem !important;
29+
}
30+
.is-mobile .view-header-title {
31+
margin-left: auto;
32+
margin-right: auto;
33+
}
34+
35+
.view-header-title:before {
36+
background: linear-gradient(-90deg, var(--background-transparent) 0%, var(--background-primary) 80%);
37+
width: 30px;
38+
content: " ";
39+
height: 100%;
40+
display: inline-block;
41+
vertical-align: bottom;
42+
pointer-events: none;
43+
position: absolute;
44+
left: 0px;
45+
}
46+
.view-header-title:after {
47+
background: linear-gradient(90deg, var(--background-transparent) 0%, var(--background-primary) 80%);
48+
width: 30px;
49+
content: " ";
50+
height: 100%;
51+
display: inline-block;
52+
vertical-align: bottom;
53+
pointer-events: none;
54+
position: absolute;
55+
right: 0px;
56+
}

0 commit comments

Comments
 (0)