forked from who-took-hu4d/float_callouts_css
-
Notifications
You must be signed in to change notification settings - Fork 0
/
float-callouts.css
69 lines (61 loc) · 1.93 KB
/
float-callouts.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
/* callout alts */
.callout[data-callout-metadata~="right"] {
float: right;
clear: right;
width: 30%;
margin: var(--infobox-margin);
}
.callout[data-callout-metadata~="left"] {
float: left;
clear: left;
width: 30%;
margin: var(--infobox-margin-left);
}
body:not(.info-normal) .callout[data-callout="info"]:not([data-callout-metadata~="normal"]) .callout-title {
background-color: var(--h6-background);
border: none;
padding:0.2em;
}
/*
/* callout classes */
.hide-callout-title .callout[data-callout="info"] .callout-content p:first-of-type{
margin: 0px; /* close gaps in infobox when info callout title is hidden */
}
.hide-callout-title .callout[data-callout="info"] .callout-title {
display: none;
}
/* make image full size inside a callout */
.markdown-rendered .callout-content img, .cm-contentContainer .callout-content img {
float: none;
margin: 0px;
border: none;
background-color: transparent;
display: block;
width: 100%;
}
.callout-fold svg {
color: var(--text-normal);
}
.callout:not([data-callout="info"]),
.info-normal .callout[data-callout="info"] {
--h6-background: rgba(var(--callout-color), 20%); /* make header 6 match callout color */
}
/* hide callout icons option */
.callout-icon .svg-icon {
display: none;
}
.callout[data-callout="info"] .callout-title {
display: none;
}
/* Style Info Callouts as infoboxes */
body {
--infobox-position: right;
}
body:not(.info-normal) .callout[data-callout="info"]:not([data-callout-metadata~="normal"]), .callout[data-callout-metadata~="info"] {
float: var(--infobox-position);
clear: var(--infobox-position);
width: 30%;
margin: var(--infobox-margin);
background-color: var(--background-secondary-alt);
border: 1px solid var(--background-modifier-border);
}