@37signals/lexxy 0.1.22-beta → 0.1.23-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/lexxy.esm.js +185 -168
- package/dist/stylesheets/lexxy-content.css +400 -0
- package/dist/stylesheets/lexxy-editor.css +451 -0
- package/dist/stylesheets/lexxy-variables.css +73 -0
- package/dist/stylesheets/lexxy.css +2 -0
- package/package.json +3 -2
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
@import url("lexxy-variables.css");
|
|
2
|
+
|
|
3
|
+
/* Text styles
|
|
4
|
+
/* -------------------------------------------------------------------------- */
|
|
5
|
+
|
|
6
|
+
:where(.lexxy-content) {
|
|
7
|
+
color: var(--lexxy-color-ink);
|
|
8
|
+
|
|
9
|
+
h1, h2, h3, h4, h5, h6 {
|
|
10
|
+
display: block;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
hyphens: auto;
|
|
13
|
+
margin-block: 0 var(--lexxy-content-margin);
|
|
14
|
+
overflow-wrap: break-word;
|
|
15
|
+
text-wrap: balance;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
h1 { font-size: 2rem; }
|
|
19
|
+
h2 { font-size: 1.5rem; }
|
|
20
|
+
h3 { font-size: 1.25rem; }
|
|
21
|
+
h4 { font-size: 1rem; }
|
|
22
|
+
h5 { font-size: 0.875rem; }
|
|
23
|
+
h6 { font-size: 0.75rem; }
|
|
24
|
+
|
|
25
|
+
p,
|
|
26
|
+
ul,
|
|
27
|
+
ol,
|
|
28
|
+
dl,
|
|
29
|
+
blockquote,
|
|
30
|
+
figure,
|
|
31
|
+
.attachment {
|
|
32
|
+
margin-block: 0 var(--lexxy-content-margin);
|
|
33
|
+
|
|
34
|
+
&:not(lexxy-editor &) {
|
|
35
|
+
overflow-wrap: break-word;
|
|
36
|
+
text-wrap: pretty;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.lexxy-content__italic {
|
|
41
|
+
font-style: italic;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.lexxy-content__bold {
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.lexxy-content__strikethrough {
|
|
49
|
+
text-decoration: line-through;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.lexxy-content__underline {
|
|
53
|
+
text-decoration: underline;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
mark,
|
|
57
|
+
.lexxy-content__highlight {
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
color: inherit;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
blockquote {
|
|
63
|
+
border-inline-start: 0.25em solid var(--lexxy-color-ink-lighter);
|
|
64
|
+
font-style: italic;
|
|
65
|
+
margin: var(--lexxy-content-margin) 0;
|
|
66
|
+
padding: 0.5lh 2ch;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
p:empty {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
a {
|
|
74
|
+
color: var(--lexxy-color-link);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
img,
|
|
78
|
+
video,
|
|
79
|
+
embed,
|
|
80
|
+
object {
|
|
81
|
+
inline-size: auto;
|
|
82
|
+
margin-inline: auto;
|
|
83
|
+
max-block-size: 32rem;
|
|
84
|
+
object-fit: contain;
|
|
85
|
+
|
|
86
|
+
a:has(&) {
|
|
87
|
+
display: inline-block;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
code, pre {
|
|
92
|
+
background-color: var(--lexxy-color-ink-lightest);
|
|
93
|
+
border-radius: var(--lexxy-radius);
|
|
94
|
+
color: var(--lexxy-color-ink);
|
|
95
|
+
font-family: var(--lexxy-font-mono);
|
|
96
|
+
font-size: 0.9em;
|
|
97
|
+
padding: 0.25ch 0.5ch;
|
|
98
|
+
|
|
99
|
+
&:is(pre),
|
|
100
|
+
&[data-language] {
|
|
101
|
+
border-radius: var(--lexxy-radius);
|
|
102
|
+
display: block;
|
|
103
|
+
hyphens: none;
|
|
104
|
+
margin-block: 0 var(--lexxy-content-margin);
|
|
105
|
+
overflow-x: auto;
|
|
106
|
+
padding: 1ch;
|
|
107
|
+
tab-size: 2;
|
|
108
|
+
text-wrap: nowrap;
|
|
109
|
+
white-space: pre;
|
|
110
|
+
word-break: break-word;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
li.lexxy-nested-listitem {
|
|
115
|
+
list-style-type: none;
|
|
116
|
+
|
|
117
|
+
ol, ul {
|
|
118
|
+
margin: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
> :last-child {
|
|
123
|
+
margin-block-end: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Keywords and attributes */
|
|
127
|
+
.code-token__attr,
|
|
128
|
+
.token.atrule,
|
|
129
|
+
.token.attr,
|
|
130
|
+
.token.keyword {
|
|
131
|
+
color: var(--lexxy-color-code-token-att);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Constants, booleans, numbers, properties, tags */
|
|
135
|
+
.code-token__property,
|
|
136
|
+
.token.boolean,
|
|
137
|
+
.token.constant,
|
|
138
|
+
.token.number,
|
|
139
|
+
.token.property,
|
|
140
|
+
.token.symbol,
|
|
141
|
+
.token.tag {
|
|
142
|
+
color: var(--lexxy-color-code-token-property);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Strings, selectors, and built-in constructs */
|
|
146
|
+
.code-token__selector,
|
|
147
|
+
.token.builtin,
|
|
148
|
+
.token.char,
|
|
149
|
+
.token.inserted,
|
|
150
|
+
.token.line,
|
|
151
|
+
.token.selector,
|
|
152
|
+
.token.string {
|
|
153
|
+
color: var(--lexxy-color-code-token-selector);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Comments and meta information */
|
|
157
|
+
.code-token__comment,
|
|
158
|
+
.token.cdata,
|
|
159
|
+
.token.comment,
|
|
160
|
+
.token.doctype,
|
|
161
|
+
.token.prolog {
|
|
162
|
+
color: var(--lexxy-color-code-token-comment);
|
|
163
|
+
font-style: italic;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Operators and symbolic entities */
|
|
167
|
+
.code-token__operator,
|
|
168
|
+
.token.deleted,
|
|
169
|
+
.token.entity,
|
|
170
|
+
.token.operator,
|
|
171
|
+
.token.url,
|
|
172
|
+
code[data-language="diff"] .code-token__operator + .code-token__selector {
|
|
173
|
+
color: var(--lexxy-color-code-token-operator);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Functions and class names */
|
|
177
|
+
.code-token__function,
|
|
178
|
+
.token.class,
|
|
179
|
+
.token.class-name,
|
|
180
|
+
.token.function {
|
|
181
|
+
color: var(--lexxy-color-code-token-function);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Variables, regex, namespaces, important */
|
|
185
|
+
.code-token__variable,
|
|
186
|
+
.token.important,
|
|
187
|
+
.token.namespace,
|
|
188
|
+
.token.regex,
|
|
189
|
+
.token.variable {
|
|
190
|
+
color: var(--lexxy-color-code-token-variable);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Punctuation */
|
|
194
|
+
.code-token__punctuation,
|
|
195
|
+
.token.punctuation {
|
|
196
|
+
color: var(--lexxy-color-code-token-punctuation);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:where([data-lexical-cursor]) {
|
|
201
|
+
animation: blink 1s step-end infinite;
|
|
202
|
+
block-size: 1lh;
|
|
203
|
+
border-inline-start: 1px solid currentColor;
|
|
204
|
+
line-height: inherit;
|
|
205
|
+
margin-block: 1em;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Attachments
|
|
209
|
+
/* ------------------------------------------------------------------------ */
|
|
210
|
+
|
|
211
|
+
:where(.attachment) {
|
|
212
|
+
block-size: auto;
|
|
213
|
+
display: block;
|
|
214
|
+
inline-size: fit-content;
|
|
215
|
+
position: relative;
|
|
216
|
+
margin-inline: auto;
|
|
217
|
+
max-inline-size: 100%;
|
|
218
|
+
text-align: center;
|
|
219
|
+
|
|
220
|
+
:where(progress) {
|
|
221
|
+
inline-size: 100%;
|
|
222
|
+
margin: auto;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:where(.attachment__caption) {
|
|
227
|
+
color: var(--lexxy-color-text-subtle);
|
|
228
|
+
font-size: var(--lexxy-text-small);
|
|
229
|
+
|
|
230
|
+
textarea {
|
|
231
|
+
background: var(--lexxy-color-canvas);
|
|
232
|
+
border: none;
|
|
233
|
+
color: inherit;
|
|
234
|
+
font-family: inherit;
|
|
235
|
+
inline-size: 100%;
|
|
236
|
+
max-inline-size: 100%;
|
|
237
|
+
resize: none;
|
|
238
|
+
text-align: center;
|
|
239
|
+
|
|
240
|
+
&:focus {
|
|
241
|
+
outline: none;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@supports (field-sizing: content) {
|
|
245
|
+
field-sizing: content;
|
|
246
|
+
inline-size: auto;
|
|
247
|
+
min-inline-size: 20ch;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
:where(.attachment__icon) {
|
|
253
|
+
aspect-ratio: 4/5;
|
|
254
|
+
background-color: color-mix(var(--lexxy-attachment-icon-color), transparent 90%);
|
|
255
|
+
block-size: 3lh;
|
|
256
|
+
border: 2px solid var(--lexxy-attachment-icon-color);
|
|
257
|
+
border-block-start-width: 1ch;
|
|
258
|
+
border-radius: var(--lexxy-radius);
|
|
259
|
+
box-sizing: border-box;
|
|
260
|
+
color: var(--lexxy-attachment-icon-color);
|
|
261
|
+
display: grid;
|
|
262
|
+
font-size: var(--lexxy-text-small);
|
|
263
|
+
font-weight: bold;
|
|
264
|
+
inline-size: auto;
|
|
265
|
+
place-content: center;
|
|
266
|
+
text-transform: uppercase;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:where(.attachment--preview) {
|
|
270
|
+
border-radius: var(--lexxy-radius);
|
|
271
|
+
|
|
272
|
+
img, video {
|
|
273
|
+
block-size: auto;
|
|
274
|
+
display: block;
|
|
275
|
+
margin-inline: auto;
|
|
276
|
+
max-inline-size: 100%;
|
|
277
|
+
user-select: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
> a {
|
|
281
|
+
display: block;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.attachment__caption {
|
|
285
|
+
margin-block-start: 1ch;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:where(.attachment--file) {
|
|
290
|
+
--lexxy-attachment-icon-color: var(--lexxy-color-text-subtle);
|
|
291
|
+
|
|
292
|
+
align-items: center;
|
|
293
|
+
display: flex;
|
|
294
|
+
flex-wrap: wrap;
|
|
295
|
+
gap: 1ch;
|
|
296
|
+
inline-size: auto;
|
|
297
|
+
|
|
298
|
+
.attachment__caption {
|
|
299
|
+
display: grid;
|
|
300
|
+
flex: 1;
|
|
301
|
+
text-align: start;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.attachment__name {
|
|
305
|
+
color: var(--lexxy-color-ink);
|
|
306
|
+
font-weight: bold;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
:where(
|
|
311
|
+
.attachment--psd,
|
|
312
|
+
.attachment--key,
|
|
313
|
+
.attachment--sketch,
|
|
314
|
+
.attachment--ai,
|
|
315
|
+
.attachment--eps,
|
|
316
|
+
.attachment--indd,
|
|
317
|
+
.attachment--svg,
|
|
318
|
+
.attachment--ppt,
|
|
319
|
+
.attachment--pptx
|
|
320
|
+
) {
|
|
321
|
+
--lexxy-attachment-icon-color: var(--lexxy-color-red);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
:where(
|
|
325
|
+
.attachment--css,
|
|
326
|
+
.attachment--php,
|
|
327
|
+
.attachment--json,
|
|
328
|
+
.attachment--htm,
|
|
329
|
+
.attachment--html,
|
|
330
|
+
.attachment--rb,
|
|
331
|
+
.attachment--erb,
|
|
332
|
+
.attachment--ts,
|
|
333
|
+
.attachment--js
|
|
334
|
+
) {
|
|
335
|
+
--lexxy-attachment-icon-color: var(--lexxy-color-purple);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
:where(
|
|
339
|
+
.attachment--txt,
|
|
340
|
+
.attachment--pages,
|
|
341
|
+
.attachment--rtf,
|
|
342
|
+
.attachment--md,
|
|
343
|
+
.attachment--doc,
|
|
344
|
+
.attachment--docx
|
|
345
|
+
) {
|
|
346
|
+
--lexxy-attachment-icon-color: var(--lexxy-color-blue);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:where(
|
|
350
|
+
.attachment--csv,
|
|
351
|
+
.attachment--numbers,
|
|
352
|
+
.attachment--xls,
|
|
353
|
+
.attachment--xlsx
|
|
354
|
+
) {
|
|
355
|
+
--lexxy-attachment-icon-color: var(--lexxy-color-green);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* Horizontal divider */
|
|
359
|
+
:where(.horizontal-divider) {
|
|
360
|
+
margin: 0;
|
|
361
|
+
margin-block-end: .5em;
|
|
362
|
+
padding: 1.5em 0 .5em;
|
|
363
|
+
|
|
364
|
+
hr {
|
|
365
|
+
border: 0;
|
|
366
|
+
border-block-end: 1px solid currentColor;
|
|
367
|
+
inline-size: 20%;
|
|
368
|
+
margin: 0;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* Custom attachments such as mentions, etc. */
|
|
373
|
+
:where(action-text-attachment[content-type^="application/vnd.actiontext"]) {
|
|
374
|
+
--lexxy-attachment-bg-color: transparent;
|
|
375
|
+
--lexxy-attachment-image-size: 1em;
|
|
376
|
+
--lexxy-attachment-text-color: currentColor;
|
|
377
|
+
|
|
378
|
+
align-items: center;
|
|
379
|
+
background: var(--lexxy-attachment-bg-color);
|
|
380
|
+
border-radius: var(--lexxy-radius);
|
|
381
|
+
box-shadow: -0.25ch 0 0 var(--lexxy-attachment-bg-color), 0.5ch 0 0 var(--lexxy-attachment-bg-color);
|
|
382
|
+
color: var(--lexxy-attachment-text-color);
|
|
383
|
+
display: inline-flex;
|
|
384
|
+
gap: 0.25ch;
|
|
385
|
+
margin: 0;
|
|
386
|
+
padding: 0;
|
|
387
|
+
position: relative;
|
|
388
|
+
white-space: normal;
|
|
389
|
+
|
|
390
|
+
img {
|
|
391
|
+
block-size: var(--lexxy-attachment-image-size);
|
|
392
|
+
border-radius: 50%;
|
|
393
|
+
inline-size: var(--lexxy-attachment-image-size);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
&.node--selected {
|
|
397
|
+
--lexxy-attachment-bg-color: var(--lexxy-color-accent-dark);
|
|
398
|
+
--lexxy-attachment-text-color: var(--lexxy-color-ink-inverted);
|
|
399
|
+
}
|
|
400
|
+
}
|