forked from twibiral/obsidian-execute-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
276 lines (237 loc) · 5.54 KB
/
styles.css
File metadata and controls
276 lines (237 loc) · 5.54 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
/* @settings
name: Execute Code Settings
id: obsidian-execute-code
settings:
-
id: color-section-title
title: Color Settings
type: heading
level: 3
-
id: use-custom-output-color
title: Custom Code Output Color
description: Use a custom color for the output of code blocks
type: class-toggle
default: false
-
id: code-output-text-color
title: Output Text Color
type: variable-color
format: hex
opacity: false
default: '#FFFFFF'
-
id: use-custom-error-color
title: Custom Code Error Color
description: Use a custom color for the error output of code blocks
type: class-toggle
default: false
-
id: code-error-text-color
title: Error Text Color
type: variable-color
format: hex
opacity: false
default: '#FF0000'
*/
button.run-code-button {
display: none;
color: var(--text-muted);
position: absolute;
bottom: 0;
right: 0;
margin: 5px;
padding: 5px 20px 5px 20px;
z-index: 100;
}
button.clear-button {
display: none;
color: var(--text-muted);
position: absolute;
bottom: 0;
left: 0;
margin: 5px;
padding: 5px 20px 5px 20px;
z-index: 100;
}
pre:hover .run-code-button,
pre:hover .clear-button {
display: block;
}
pre:hover .run-button-disabled,
pre:hover .clear-button-disabled {
display: none;
}
.run-button-disabled,
.clear-button-disabled {
display: none;
}
pre:hover code.language-output {
margin-bottom: 28px;
}
:not(.use-custom-output-color) code.language-output span.stdout {
color: var(--text-muted) !important;
}
.use-custom-output-color code.language-output span.stdout {
color: var(--code-output-text-color) !important;
}
:not(.use-custom-error-color) code.language-output span.stderr {
color: red !important;
}
.use-custom-error-color code.language-output span.stderr {
color: var(--code-error-text-color) !important;
}
code.language-output hr {
margin: 0 0 1em;
}
.settings-code-input-box textarea,
.settings-code-input-box input {
min-width: 400px;
min-height: 100px;
font-family: monospace;
resize: vertical;
}
input.interactive-stdin {
font: inherit;
}
.manage-executors-view h3 {
margin: 1em;
}
.manage-executors-view ul {
margin: 1em;
padding: 0;
list-style-type: none;
}
.manage-executors-view ul li {
padding: 0.5em;
background: var(--background-primary-alt);
border-radius: 4px;
display: grid;
flex-direction: column;
margin-bottom: 0.5em;
}
.manage-executors-view small {
text-transform: uppercase;
font-weight: bold;
letter-spacing: 0.1ch;
grid-row: 1;
}
.manage-executors-view .filename {
grid-row: 2;
}
.manage-executors-view li button {
grid-column: 2;
grid-row: 1 / 3;
margin: 0;
padding: 0.25em;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
background: none;
}
.manage-executors-view li button:hover {
background: var(--background-tertiary);
color: var(--icon-color-hover);
}
.manage-executors-view>div {
position: relative;
}
.manage-executors-view .empty-state {
color: var(--text-muted);
padding: 0.5em;
}
.has-run-code-button {
position: relative;
}
.load-state-indicator {
position: absolute;
top: 0.1em;
left: -2em;
width: 2em;
height: 2em;
background: var(--background-primary-alt);
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
color: var(--tx1);
transform: translateX(2em);
transition: transform 0.25s, opacity 0.25s;
opacity: 0;
pointer-events: none;
cursor: pointer;
}
.load-state-indicator svg {
width: 1.5em;
height: 1.5em;
margin: 0.25em;
}
.load-state-indicator.visible {
transform: translateX(0);
opacity: 1;
pointer-events: all;
}
.load-state-indicator::before {
content: "";
box-shadow: -1em 0 1em -0.75em inset var(--background-modifier-box-shadow);
position: absolute;
display: block;
width: 100%;
height: 100%;
transform: translateX(-2em);
opacity: 0;
transition: transform 0.25s, opacity 0.25s;
pointer-events: none;
}
.load-state-indicator.visible::before {
transform: translateX(0);
opacity: 1;
}
/* Hide code blocks with language-output only in markdown view using "markdown-preview-view"*/
.markdown-preview-view pre.language-output {
display: none;
}
.markdown-rendered pre.language-output {
display: none;
}
/* Do not hide code block when exporting to PDF */
@media print {
pre.language-output {
display: block;
}
/* Hide code blocks with language-output only in markdown view using "markdown-preview-view"*/
.markdown-preview-view pre.language-output {
display: block;
}
.markdown-rendered pre.language-output {
display: block;
}
}
/* Center LaTeX vector graphics, confine to text width */
.center-latex-figures img[src*="/figure%20"][src$=".svg"],
.center-latex-figures img[src*="/figure%20"][src*=".svg?"],
.center-latex-figures .stdout img[src*=".svg?"] {
display: block;
margin: auto;
max-width: 100%;
}
/* Invert LaTeX vector graphics in dark mode */
.theme-dark.invert-latex-figures img[src*="/figure%20"][src$=".svg"],
.theme-dark.invert-latex-figures img[src*="/figure%20"][src*=".svg?"],
.theme-dark.invert-latex-figures .stdout img[src*=".svg?"] {
filter: invert(1);
}
/* Allow descriptions in LaTeX settings to be selected and copied. */
.selectable-description-text {
-moz-user-select: text;
-khtml-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
user-select: text;
}
.insert-figure-icon {
margin-left: 0.5em;
}
/* Try to keep description of cmd arguments in LaTeX settings on the same line. */
code.selectable-description-text {
white-space: nowrap;
}