-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Custom page preview.css
70 lines (58 loc) · 2.22 KB
/
Custom page preview.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Custom page preview v1.4
github.com/zamsyt */
.callout[data-callout="page-preview"] {
--callout-icon: lucide-inspect;
--callout-color: 150,150,150;
mix-blend-mode: normal;
padding: 0; }
/* Editing */
.callout[data-callout="page-preview"] .callout-title {
padding: var(--callout-padding); }
.markdown-source-view > * > * > * > * > * > * > .callout[data-callout="page-preview"] .callout-content {
border: 1px solid var(--background-modifier-border);
border-radius: var(--callout-radius); }
.callout[data-callout="page-preview"] .callout-content {
display: flex;
background: var(--background-secondary); }
.hover-popover .callout[data-callout="page-preview"] .callout-content {
display: flex !important; }
/* text */
.callout[data-callout="page-preview"] .callout-content > :first-child {
margin: 1em; }
/* image */
.callout[data-callout="page-preview"] .callout-content > :last-child:not(:first-child) {
margin: 0;
margin-left: auto;
flex-basis: 45%;
flex-shrink: 0; }
.callout[data-callout="page-preview"] .callout-content > :last-child:not(:first-child) img {
display: block;
object-fit: cover;
height: 100%;
width: 100%; }
/* Fill the whole window */
.hover-popover .markdown-preview-sizer > div > :not(.callout[data-callout="page-preview"]) {
display: none; }
:root:root:root .hover-popover .markdown-preview-view {
padding: 0; }
.hover-popover .markdown-preview-sizer {
min-height: 0 !important; }
:root .hover-popover {
min-height: var(--size-4-12); }
:root .hover-popover > .markdown-embed {
height: auto;
max-height: var(--popover-height); }
.hover-popover .callout[data-callout="page-preview"] {
margin: 0; }
/* Hide callout title */
.hover-popover .callout[data-callout="page-preview"] .callout-title {
display: none; }
/* Revert to normal preview when there's no Page preview callout.
Requires installer v1.1.9 */
.hover-popover .markdown-preview-sizer:not(:has(.callout[data-callout="page-preview"])) > div > * {
display: block; }
:root:root .hover-popover .markdown-preview-view:not(:has(.callout[data-callout="page-preview"])) {
padding: var(--file-margins); }
/* Hide in reading view */
.markdown-reading-view > * > * > * > .callout[data-callout="page-preview"] {
display: none; }