-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshort-callout.css
107 lines (95 loc) · 2.68 KB
/
short-callout.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* @settings
name: Short callout (snippet)
id: shortco-style
settings:
-
id: shortco-padding
title: Callout padding
description: "Breathing space between callout border and title/content (in rem units)."
type: variable-number-slider
default: 0.2
format: rem
min: 0
max: 2
step: 0.05
-
id: shortco-margin-top
title: Callout top margin
description: "Additional space between callout and previous paragraph (in rem units). Note: the minimal margin is theme-dependent (`--p-spacing`)."
type: variable-number-slider
default: 0
format: rem
min: 0
max: 5
step: 0.1
-
id: shortco-content-margin-left
title: Callout content left margin
description: "Space between callout title and content (in rem units)."
type: variable-number-slider
default: 0.5
format: rem
min: 0
max: 5
step: 0.05
-
id: shortco-border-color
title: Callout border color
description: "Default is `--background-modifier-border`."
type: variable-color
format: hex
opacity: false
default: '#'
*/
body {
--shortco-padding: 0.2rem;
--shortco-border-color: var(--background-modifier-border);
--shortco-content-margin-left: 0.5rem;
--shortco-margin-top: 0;
}
/* Define icons for different callouts*/
.callout[data-callout="quelle:"],
.callout[data-callout="source:"] {
--callout-icon: lucide-quote;
--callout-color: transparent;
}
.callout[data-callout="book-copy:"] {
--callout-icon: lucide-book-copy;
--callout-color: transparent;
}
.callout[data-callout="zitat:"],
.callout[data-callout="quote:"] {
--callout-icon: message-square-quote;
--callout-color: transparent;
}
.callout[data-callout="project:"] {
--callout-icon: lucide-codesandbox;
--callout-color: 52, 188, 161;
}
/* Parent container of callouts ending with ":" */
/* div.cm-callout:has(.callout[data-callout$=":"]) { */
/* } */
/* The following selectors target all callouts ending with ":" (e.g. > [!book-copy:]) */
.callout[data-callout$=":"] {
border-width: 1px;
border-color: var(--shortco-border-color);
border-radius: 0;
border-style: solid none solid none;
padding: var(--shortco-padding);
display: inline-flex;
align-items: center;
margin-top: var(--shortco-margin-top);
}
.callout[data-callout$=":"] > div.callout-title {
float: left;
margin: 0 0 0 var(--shortco-padding);
padding: 0;
}
.callout[data-callout$=":"] > div.callout-content {
margin-right: var(--shortco-padding);
margin-left: var(--shortco-padding);
padding: 0;
}
.callout[data-callout$=":"] > div.callout-content > p {
margin: 0 0 0 var(--shortco-content-margin-left);
}