Skip to content

Commit c8d667e

Browse files
committed
improve vertical centering calculation
1 parent e54afc3 commit c8d667e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

preview-vertical.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
.view-content > div > .markdown-preview-view > .markdown-preview-sizer.markdown-preview-section {
2-
transform: translateY(clamp(0px, calc(50vh - 25%), 100%));
2+
/*
3+
goal: short notes midpoint at 40vh
4+
bottom: pushes up 20vh
5+
content: ~20vh for short note
6+
push down: 40 + 20 - (20/2) = 50
7+
*/
8+
padding-bottom: 20vh !important;
9+
transform: translateY(clamp(0px, calc(50vh - 50%), 40vh));
310
}

0 commit comments

Comments
 (0)