Newer
Older
/* All styles regarding ProseMirror surface and elements */
const fontWriting = css`
font-family: ${th('fontWriting')};
font-size: ${th('fontSizeBase')};
`;
export default css`
.ProseMirror {
background: white;
line-height: 1.6;
${fontWriting}
p::selection,
h1::selection,
h2::selection,
h3::selection,
code::selection,
span::selection,
p span::selection,
h1 span::selection,
h2 span::selection,
h3 span::selection,
h4 span::selection,
code span::selection,
custom-tag-block::selection,
custom-tag-inline::selection {
background-color: transparent;
}
&:focus {
outline: none;
}
}
.ProseMirror .wax-selection-marker {
background-color: ${th('colorSelection')};
opacity: 0.8;
}
div[contenteditable='false'] {
}
ul,
ol {
padding-left: 30px;
}
blockquote {
border-left: 3px solid #eee;
margin-left: 0;
margin-right: 0;
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
}
figure {
display: table;
margin-left: auto;
margin-right: auto;
word-break: break-word;
img {
cursor: default;
height: auto;
max-width: 100%;
width: auto;
}
figcaption {
background: #e2ebff;
caption-side: bottom;
display: table-caption;
max-width: 100%;
min-height: 20px;
padding: 4px;
width: auto;
&:focus {
outline: none;
}
&:before {
content: 'Caption: ';
font-weight: bold;
}
}
}
sup,
sub {
line-height: 0;
}
strong {
font-weight: bold;
}
/* Tables */
table {
border-collapse: initial;
border-spacing: 0;
border-width: 0 thin thin 0;
margin: 0;
overflow: hidden;
page-break-inside: avoid;
}
th,
td {
border: 1px solid #eee;
/*width: 200px;*/
padding: 2px 5px;
vertical-align: top;
box-sizing: border-box;
position: relative;
}
.tableWrapper {
overflow-x: auto;
}
.column-resize-handle {
background-color: #adf;
bottom: 0;
pointer-events: none;
position: absolute;
right: -2px;
top: 0;
width: 4px;
z-index: 20;
}
.ProseMirror.resize-cursor {
cursor: ew-resize;
cursor: col-resize;
}
/* Give selected cells a blue overlay */
.selectedCell:after {
background: rgba(200, 200, 255, 0.4);
bottom: 0;
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
}
/* placeholder */
.empty-node::before {
color: #aaa;
float: left;
font-style: italic;
pointer-events: none;
height: 0;
}
p.empty-node:first-child::before {
content: attr(data-content);
}
/* invisible characters */
.invisible {
pointer-events: none;
user-select: none;
}
.invisible:before {
caret-color: inherit;
color: gray;
display: inline-block;
font-weight: 400;
font-style: normal;
line-height: 1em;
width: 0;
}
.invisible--space:before {
content: '·';
}
.invisible--break:before {
content: '¬';
}
.invisible--par:after {
content: '¶';
}
/* == Math Nodes ======================================== */
.math-node {
min-width: 1em;
min-height: 1em;
font-size: 0.95em;
font-family: 'Consolas', 'Ubuntu Mono', monospace;
cursor: auto;
.ProseMirror {
box-shadow: none;
min-height: 100%;
padding: 0;
background: #eee;
color: rgb(132, 33, 162);
}
}
.math-node.empty-math .math-render::before {
content: '(empty)';
color: red;
}
.math-node .math-render.parse-error::before {
content: '(math error)';
color: red;
cursor: help;
}
.math-node.ProseMirror-selectednode {
outline: none;
}
.math-node .math-src {
color: rgb(132, 33, 162);
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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
tab-size: 4;
}
.math-node.ProseMirror-selectednode .math-src {
display: flex;
}
.math-node.ProseMirror-selectednode .math-render {
display: none;
}
/* -- Inline Math --------------------------------------- */
math-inline {
display: inline;
white-space: nowrap;
}
math-inline .math-render {
display: inline-block;
font-size: 0.85em;
cursor: pointer;
}
math-inline .math-src .ProseMirror {
display: inline;
}
math-inline .math-src::after,
math-inline .math-src::before {
content: '$';
color: #b0b0b0;
}
/* -- Block Math ---------------------------------------- */
math-display {
display: block;
}
math-display .math-render {
display: block;
}
math-display.ProseMirror-selectednode {
background-color: #eee;
}
math-display .math-src .ProseMirror {
width: 100%;
display: block;
}
math-display .math-src::after,
math-display .math-src::before {
content: '$$';
text-align: left;
color: #b0b0b0;
}
math-display .katex-display {
margin: 0;
}
/* -- Selection Plugin ---------------------------------- */
p::selection,
p > *::selection {
background-color: #c0c0c0;
}
.katex-html *::selection {
background-color: none !important;
}
.math-node.math-select .math-render {
background-color: #c0c0c0ff;
}
math-inline.math-select .math-render {
padding-top: 2px;
}
.transform-icon {
transform: rotate(40deg);
}
/* -- Questions ---------------------------------- */
/* -- Multiple Choice ---------------------------------- */
border: 3px solid #f5f5f7;
counter-reset: question-item-multiple;
margin: 38px;
padding: 20px;
content: 'Answer Group ' counter(multiple-question) '.';
counter-increment: multiple-question;
position: relative;
right: 20px;
}
.ProseMirror {
box-shadow: none;
padding: 5px 5px 0 5px;
}
}
/* -- Fill The Gap ---------------------------------- */
.fill-the-gap {
border: 3px solid #f5f5f7;
margin-bottom: 30px;
margin-top: 30px;
padding: 3px;
&:before {
background-color: #fff;
bottom: 22px;
color: #535e76;
content: 'Fill The Gap';
height: 10px;
left: -1px;
position: relative;
width: 30px;
}
}