@pikacss/plugin-typography 0.0.51 → 0.0.54

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.mjs +279 -432
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -30,7 +30,7 @@ Then use in templates:
30
30
 
31
31
  ## Documentation
32
32
 
33
- See the [full documentation](https://pikacss.com/official-plugins/typography).
33
+ See the [full documentation](https://pikacss.github.io/official-plugins/typography).
34
34
 
35
35
  ## License
36
36
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineEnginePlugin, defineStyleDefinition } from "@pikacss/core";
1
+ import { defineEnginePlugin } from "@pikacss/core";
2
2
  //#region src/styles.ts
3
3
  /**
4
4
  * Default CSS custom property values for prose typography colors and accents.
@@ -49,446 +49,293 @@ const typographyVariables = {
49
49
  * engine.shortcuts.add(['prose-base', proseBaseStyle])
50
50
  * ```
51
51
  */
52
- const proseBaseStyle = defineStyleDefinition({
52
+ const proseBaseStyle = {
53
53
  "color": "var(--pk-prose-color-body)",
54
54
  "maxWidth": "65ch",
55
55
  "fontSize": "1rem",
56
56
  "lineHeight": "1.75",
57
57
  "$ > :first-child": { marginTop: "0" },
58
58
  "$ > :last-child": { marginBottom: "0" }
59
- });
60
- /**
61
- * Paragraph and lead-text styles for prose content.
62
- * @internal
63
- *
64
- * @remarks Applies vertical margins to `<p>` elements and additional size,
65
- * color, and spacing overrides for elements carrying the `lead` class.
66
- *
67
- * @example
68
- * ```ts
69
- * engine.shortcuts.add(['prose-paragraphs', ['prose-base', proseParagraphsStyle]])
70
- * ```
71
- */
72
- const proseParagraphsStyle = defineStyleDefinition({
73
- "$ p": {
74
- marginTop: "1.25em",
75
- marginBottom: "1.25em"
76
- },
77
- "$ [class~=\"lead\"]": {
78
- color: "var(--pk-prose-color-lead)",
79
- fontSize: "1.25em",
80
- lineHeight: "1.6",
81
- marginTop: "1.2em",
82
- marginBottom: "1.2em"
83
- }
84
- });
85
- /**
86
- * Anchor link styles for prose content.
87
- * @internal
88
- *
89
- * @remarks Sets link color, underline decoration, and medium font weight.
90
- * Nested `<strong>` and `<code>` inside links inherit the link color.
91
- *
92
- * @example
93
- * ```ts
94
- * engine.shortcuts.add(['prose-links', ['prose-base', proseLinksStyle]])
95
- * ```
96
- */
97
- const proseLinksStyle = defineStyleDefinition({
98
- "$ a": {
99
- color: "var(--pk-prose-color-links)",
100
- textDecoration: "underline",
101
- fontWeight: "500"
102
- },
103
- "$ a strong": { color: "inherit" },
104
- "$ a code": { color: "inherit" }
105
- });
106
- /**
107
- * Strong and italic emphasis styles for prose content.
108
- * @internal
109
- *
110
- * @remarks Bold text receives a dedicated color variable and semi-bold weight.
111
- * When `<strong>` appears inside links, blockquotes, or table headers the
112
- * color inherits from the parent to avoid clashing with contextual colors.
113
- *
114
- * @example
115
- * ```ts
116
- * engine.shortcuts.add(['prose-emphasis', ['prose-base', proseEmphasisStyle]])
117
- * ```
118
- */
119
- const proseEmphasisStyle = defineStyleDefinition({
120
- "$ strong": {
121
- color: "var(--pk-prose-color-bold)",
122
- fontWeight: "600"
123
- },
124
- "$ a strong": { color: "inherit" },
125
- "$ blockquote strong": { color: "inherit" },
126
- "$ thead th strong": { color: "inherit" },
127
- "$ em": { fontStyle: "italic" }
128
- });
129
- /**
130
- * Keyboard input (`<kbd>`) styles for prose content.
131
- * @internal
132
- *
133
- * @remarks Renders `<kbd>` elements with a subtle raised appearance using
134
- * box-shadow borders. Color and shadow are driven by dedicated CSS variables.
135
- *
136
- * @example
137
- * ```ts
138
- * engine.shortcuts.add(['prose-kbd', ['prose-base', proseKbdStyle]])
139
- * ```
140
- */
141
- const proseKbdStyle = defineStyleDefinition({ "$ kbd": {
142
- color: "var(--pk-prose-color-kbd)",
143
- fontSize: "0.875em",
144
- fontWeight: "500",
145
- fontFamily: "inherit",
146
- borderRadius: "0.3125rem",
147
- paddingTop: "0.1875em",
148
- paddingRight: "0.375em",
149
- paddingBottom: "0.1875em",
150
- paddingLeft: "0.375em",
151
- boxShadow: "0 0 0 1px var(--pk-prose-kbd-shadows), 0 3px 0 var(--pk-prose-kbd-shadows)"
152
- } });
153
- /**
154
- * Ordered list, unordered list, and definition list styles for prose content.
155
- * @internal
156
- *
157
- * @remarks Handles list markers (decimal, alpha, roman), nested list bullet
158
- * progression (disc → circle → square), item spacing, and definition list
159
- * (`<dl>`, `<dt>`, `<dd>`) layout.
160
- *
161
- * @example
162
- * ```ts
163
- * engine.shortcuts.add(['prose-lists', ['prose-base', proseListsStyle]])
164
- * ```
165
- */
166
- const proseListsStyle = defineStyleDefinition({
167
- "$ ol": {
168
- listStyleType: "decimal",
169
- marginTop: "1.25em",
170
- marginBottom: "1.25em",
171
- paddingLeft: "1.625em"
172
- },
173
- "$ ol[type=\"A\"]": { listStyleType: "upper-alpha" },
174
- "$ ol[type=\"a\"]": { listStyleType: "lower-alpha" },
175
- "$ ol[type=\"A\" s]": { listStyleType: "upper-alpha" },
176
- "$ ol[type=\"a\" s]": { listStyleType: "lower-alpha" },
177
- "$ ol[type=\"I\"]": { listStyleType: "upper-roman" },
178
- "$ ol[type=\"i\"]": { listStyleType: "lower-roman" },
179
- "$ ol[type=\"I\" s]": { listStyleType: "upper-roman" },
180
- "$ ol[type=\"i\" s]": { listStyleType: "lower-roman" },
181
- "$ ol[type=\"1\"]": { listStyleType: "decimal" },
182
- "$ ul": {
183
- listStyleType: "disc",
184
- marginTop: "1.25em",
185
- marginBottom: "1.25em",
186
- paddingLeft: "1.625em"
187
- },
188
- "$ ul ul": { listStyleType: "circle" },
189
- "$ ul ul ul": { listStyleType: "square" },
190
- "$ li": {
191
- marginTop: "0.5em",
192
- marginBottom: "0.5em"
193
- },
194
- "$ ol > li": { paddingLeft: "0.375em" },
195
- "$ ul > li": { paddingLeft: "0.375em" },
196
- "$ > ul > li p": {
197
- marginTop: "0.75em",
198
- marginBottom: "0.75em"
199
- },
200
- "$ > ul > li > :first-child": { marginTop: "1.25em" },
201
- "$ > ul > li > :last-child": { marginBottom: "1.25em" },
202
- "$ > ol > li > :first-child": { marginTop: "1.25em" },
203
- "$ > ol > li > :last-child": { marginBottom: "1.25em" },
204
- "$ ul ul, $ ul ol, $ ol ul, $ ol ol": {
205
- marginTop: "0.75em",
206
- marginBottom: "0.75em"
207
- },
208
- "$ dl": {
209
- marginTop: "1.25em",
210
- marginBottom: "1.25em"
211
- },
212
- "$ dt": {
213
- color: "var(--pk-prose-color-headings)",
214
- fontWeight: "600",
215
- marginTop: "1.25em"
216
- },
217
- "$ dd": {
218
- marginTop: "0.5em",
219
- paddingLeft: "1.625em"
220
- }
221
- });
222
- /**
223
- * Horizontal rule (`<hr>`) styles for prose content.
224
- * @internal
225
- *
226
- * @remarks Applies generous vertical margins and a single-pixel top border
227
- * colored by the `--pk-prose-color-hr` variable. The element immediately
228
- * following an `<hr>` has its top margin collapsed.
229
- *
230
- * @example
231
- * ```ts
232
- * engine.shortcuts.add(['prose-hr', ['prose-base', proseHrStyle]])
233
- * ```
234
- */
235
- const proseHrStyle = defineStyleDefinition({
236
- "$ hr": {
237
- borderColor: "var(--pk-prose-color-hr)",
238
- borderTopWidth: "1px",
239
- marginTop: "3em",
240
- marginBottom: "3em"
241
- },
242
- "$ hr + *": { marginTop: "0" }
243
- });
244
- /**
245
- * Heading (h1–h4) styles for prose content.
246
- * @internal
247
- *
248
- * @remarks Each heading level gets a distinct font size, weight, line height,
249
- * and vertical margin. Nested `<strong>` receives a heavier weight and
250
- * `<code>` inherits the heading color. Sibling elements after h2/h3/h4
251
- * have their top margin collapsed.
252
- *
253
- * @example
254
- * ```ts
255
- * engine.shortcuts.add(['prose-headings', ['prose-base', proseHeadingsStyle]])
256
- * ```
257
- */
258
- const proseHeadingsStyle = defineStyleDefinition({
259
- "$ h1": {
260
- color: "var(--pk-prose-color-headings)",
261
- fontWeight: "800",
262
- fontSize: "2.25em",
263
- marginTop: "0",
264
- marginBottom: "0.88em",
265
- lineHeight: "1.1"
266
- },
267
- "$ h1 strong": { fontWeight: "900" },
268
- "$ h1 code": { color: "inherit" },
269
- "$ h2": {
270
- color: "var(--pk-prose-color-headings)",
271
- fontWeight: "700",
272
- fontSize: "1.5em",
273
- marginTop: "2em",
274
- marginBottom: "1em",
275
- lineHeight: "1.33"
276
- },
277
- "$ h2 strong": { fontWeight: "800" },
278
- "$ h2 code": { color: "inherit" },
279
- "$ h2 + *": { marginTop: "0" },
280
- "$ h3": {
281
- color: "var(--pk-prose-color-headings)",
282
- fontWeight: "600",
283
- fontSize: "1.25em",
284
- marginTop: "1.6em",
285
- marginBottom: "0.6em",
286
- lineHeight: "1.6"
287
- },
288
- "$ h3 strong": { fontWeight: "700" },
289
- "$ h3 code": { color: "inherit" },
290
- "$ h3 + *": { marginTop: "0" },
291
- "$ h4": {
292
- color: "var(--pk-prose-color-headings)",
293
- fontWeight: "600",
294
- marginTop: "1.5em",
295
- marginBottom: "0.5em",
296
- lineHeight: "1.5"
297
- },
298
- "$ h4 strong": { fontWeight: "700" },
299
- "$ h4 code": { color: "inherit" },
300
- "$ h4 + *": { marginTop: "0" }
301
- });
302
- /**
303
- * Blockquote styles for prose content.
304
- * @internal
305
- *
306
- * @remarks Renders blockquotes with italic text, a left border accent,
307
- * and automatic open/close curly quotes via CSS `content`. Nested
308
- * `<code>` inherits the quote color.
309
- *
310
- * @example
311
- * ```ts
312
- * engine.shortcuts.add(['prose-quotes', ['prose-base', proseQuotesStyle]])
313
- * ```
314
- */
315
- const proseQuotesStyle = defineStyleDefinition({
316
- "$ blockquote": {
317
- fontWeight: "500",
318
- fontStyle: "italic",
319
- color: "var(--pk-prose-color-quotes)",
320
- borderLeftWidth: "0.25rem",
321
- borderLeftColor: "var(--pk-prose-color-quote-borders)",
322
- quotes: "\"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\"",
323
- marginTop: "1.6em",
324
- marginBottom: "1.6em",
325
- paddingLeft: "1em"
326
- },
327
- "$ blockquote p:first-of-type::before": { content: "open-quote" },
328
- "$ blockquote p:last-of-type::after": { content: "close-quote" },
329
- "$ blockquote code": { color: "inherit" }
330
- });
331
- /**
332
- * Image, video, picture, figure, and figcaption styles for prose content.
333
- * @internal
334
- *
335
- * @remarks Applies consistent vertical margins to media elements and
336
- * collapses inner margins within `<figure>`. Figcaptions receive a
337
- * smaller font size and the captions color variable.
338
- *
339
- * @example
340
- * ```ts
341
- * engine.shortcuts.add(['prose-media', ['prose-base', proseMediaStyle]])
342
- * ```
343
- */
344
- const proseMediaStyle = defineStyleDefinition({
345
- "$ img": {
346
- marginTop: "2em",
347
- marginBottom: "2em"
348
- },
349
- "$ picture": {
350
- display: "block",
351
- marginTop: "2em",
352
- marginBottom: "2em"
353
- },
354
- "$ video": {
355
- marginTop: "2em",
356
- marginBottom: "2em"
357
- },
358
- "$ figure": {
359
- marginTop: "2em",
360
- marginBottom: "2em"
361
- },
362
- "$ figure > *": {
363
- marginTop: "0",
364
- marginBottom: "0"
365
- },
366
- "$ figcaption": {
367
- color: "var(--pk-prose-color-captions)",
368
- fontSize: "0.875em",
369
- lineHeight: "1.4",
370
- marginTop: "0.85em"
371
- }
372
- });
373
- /**
374
- * Inline code and preformatted code block styles for prose content.
375
- * @internal
376
- *
377
- * @remarks Inline `<code>` receives backtick-style pseudo-element wrappers
378
- * and bold weight. `<pre>` blocks get background color, rounded corners,
379
- * horizontal scroll, and padding. Code inside `<pre>` resets to inherit
380
- * parent styles and removes the backtick wrappers.
381
- *
382
- * @example
383
- * ```ts
384
- * engine.shortcuts.add(['prose-code', ['prose-base', proseCodeStyle]])
385
- * ```
386
- */
387
- const proseCodeStyle = defineStyleDefinition({
388
- "$ code": {
389
- color: "var(--pk-prose-color-code)",
390
- fontWeight: "600",
391
- fontSize: "0.875em"
392
- },
393
- "$ code::before": { content: "\"`\"" },
394
- "$ code::after": { content: "\"`\"" },
395
- "$ pre": {
396
- color: "var(--pk-prose-color-pre-code)",
397
- backgroundColor: "var(--pk-prose-color-pre-bg)",
398
- overflowX: "auto",
399
- fontWeight: "400",
400
- fontSize: "0.875em",
401
- lineHeight: "1.7",
402
- marginTop: "1.7em",
403
- marginBottom: "1.7em",
404
- borderRadius: "0.375rem",
405
- paddingTop: "0.85em",
406
- paddingRight: "1.14em",
407
- paddingBottom: "0.85em",
408
- paddingLeft: "1.14em"
409
- },
410
- "$ pre code": {
411
- backgroundColor: "transparent",
412
- borderWidth: "0",
413
- borderRadius: "0",
414
- padding: "0",
415
- fontWeight: "inherit",
416
- color: "inherit",
417
- fontSize: "inherit",
418
- fontFamily: "inherit",
419
- lineHeight: "inherit"
420
- },
421
- "$ pre code::before": { content: "none" },
422
- "$ pre code::after": { content: "none" }
423
- });
424
- /**
425
- * Table, thead, tbody, and tfoot styles for prose content.
426
- * @internal
427
- *
428
- * @remarks Tables span the full width with auto layout. Header cells receive
429
- * the headings color and bottom border; body rows get per-row bottom
430
- * borders (removed on the last row). First and last cell padding is
431
- * collapsed flush with the table edges.
432
- *
433
- * @example
434
- * ```ts
435
- * engine.shortcuts.add(['prose-tables', ['prose-base', proseTablesStyle]])
436
- * ```
437
- */
438
- const proseTablesStyle = defineStyleDefinition({
439
- "$ table": {
440
- width: "100%",
441
- tableLayout: "auto",
442
- textAlign: "left",
443
- marginTop: "2em",
444
- marginBottom: "2em",
445
- fontSize: "0.875em",
446
- lineHeight: "1.7"
447
- },
448
- "$ thead": {
449
- borderBottomWidth: "1px",
450
- borderBottomColor: "var(--pk-prose-color-th-borders)"
451
- },
452
- "$ thead th": {
453
- color: "var(--pk-prose-color-headings)",
454
- fontWeight: "600",
455
- verticalAlign: "bottom",
456
- paddingRight: "0.57em",
457
- paddingBottom: "0.57em",
458
- paddingLeft: "0.57em"
459
- },
460
- "$ thead th:first-child": { paddingLeft: "0" },
461
- "$ thead th:last-child": { paddingRight: "0" },
462
- "$ thead th code": { color: "inherit" },
463
- "$ tbody tr": {
464
- borderBottomWidth: "1px",
465
- borderBottomColor: "var(--pk-prose-color-td-borders)"
466
- },
467
- "$ tbody tr:last-child": { borderBottomWidth: "0" },
468
- "$ tbody td": { verticalAlign: "baseline" },
469
- "$ tbody td, $ tfoot td": {
470
- paddingTop: "0.57em",
471
- paddingRight: "0.57em",
472
- paddingBottom: "0.57em",
473
- paddingLeft: "0.57em"
474
- },
475
- "$ tbody td:first-child, $ tfoot td:first-child": { paddingLeft: "0" },
476
- "$ tbody td:last-child, $ tfoot td:last-child": { paddingRight: "0" }
477
- });
59
+ };
478
60
  //#endregion
479
61
  //#region src/index.ts
480
62
  const proseShortcutModules = [
481
- ["prose-paragraphs", proseParagraphsStyle],
482
- ["prose-links", proseLinksStyle],
483
- ["prose-emphasis", proseEmphasisStyle],
484
- ["prose-kbd", proseKbdStyle],
485
- ["prose-lists", proseListsStyle],
486
- ["prose-hr", proseHrStyle],
487
- ["prose-headings", proseHeadingsStyle],
488
- ["prose-quotes", proseQuotesStyle],
489
- ["prose-media", proseMediaStyle],
490
- ["prose-code", proseCodeStyle],
491
- ["prose-tables", proseTablesStyle]
63
+ ["prose-paragraphs", {
64
+ "$ p": {
65
+ marginTop: "1.25em",
66
+ marginBottom: "1.25em"
67
+ },
68
+ "$ [class~=\"lead\"]": {
69
+ color: "var(--pk-prose-color-lead)",
70
+ fontSize: "1.25em",
71
+ lineHeight: "1.6",
72
+ marginTop: "1.2em",
73
+ marginBottom: "1.2em"
74
+ }
75
+ }],
76
+ ["prose-links", {
77
+ "$ a": {
78
+ color: "var(--pk-prose-color-links)",
79
+ textDecoration: "underline",
80
+ fontWeight: "500"
81
+ },
82
+ "$ a strong": { color: "inherit" },
83
+ "$ a code": { color: "inherit" }
84
+ }],
85
+ ["prose-emphasis", {
86
+ "$ strong": {
87
+ color: "var(--pk-prose-color-bold)",
88
+ fontWeight: "600"
89
+ },
90
+ "$ a strong": { color: "inherit" },
91
+ "$ blockquote strong": { color: "inherit" },
92
+ "$ thead th strong": { color: "inherit" },
93
+ "$ em": { fontStyle: "italic" }
94
+ }],
95
+ ["prose-kbd", { "$ kbd": {
96
+ color: "var(--pk-prose-color-kbd)",
97
+ fontSize: "0.875em",
98
+ fontWeight: "500",
99
+ fontFamily: "inherit",
100
+ borderRadius: "0.3125rem",
101
+ paddingTop: "0.1875em",
102
+ paddingRight: "0.375em",
103
+ paddingBottom: "0.1875em",
104
+ paddingLeft: "0.375em",
105
+ boxShadow: "0 0 0 1px var(--pk-prose-kbd-shadows), 0 3px 0 var(--pk-prose-kbd-shadows)"
106
+ } }],
107
+ ["prose-lists", {
108
+ "$ ol": {
109
+ listStyleType: "decimal",
110
+ marginTop: "1.25em",
111
+ marginBottom: "1.25em",
112
+ paddingLeft: "1.625em"
113
+ },
114
+ "$ ol[type=\"A\"]": { listStyleType: "upper-alpha" },
115
+ "$ ol[type=\"a\"]": { listStyleType: "lower-alpha" },
116
+ "$ ol[type=\"A\" s]": { listStyleType: "upper-alpha" },
117
+ "$ ol[type=\"a\" s]": { listStyleType: "lower-alpha" },
118
+ "$ ol[type=\"I\"]": { listStyleType: "upper-roman" },
119
+ "$ ol[type=\"i\"]": { listStyleType: "lower-roman" },
120
+ "$ ol[type=\"I\" s]": { listStyleType: "upper-roman" },
121
+ "$ ol[type=\"i\" s]": { listStyleType: "lower-roman" },
122
+ "$ ol[type=\"1\"]": { listStyleType: "decimal" },
123
+ "$ ul": {
124
+ listStyleType: "disc",
125
+ marginTop: "1.25em",
126
+ marginBottom: "1.25em",
127
+ paddingLeft: "1.625em"
128
+ },
129
+ "$ ul ul": { listStyleType: "circle" },
130
+ "$ ul ul ul": { listStyleType: "square" },
131
+ "$ li": {
132
+ marginTop: "0.5em",
133
+ marginBottom: "0.5em"
134
+ },
135
+ "$ ol > li": { paddingLeft: "0.375em" },
136
+ "$ ul > li": { paddingLeft: "0.375em" },
137
+ "$ > ul > li p": {
138
+ marginTop: "0.75em",
139
+ marginBottom: "0.75em"
140
+ },
141
+ "$ > ul > li > p:first-child": { marginTop: "1.25em" },
142
+ "$ > ul > li > p:last-child": { marginBottom: "1.25em" },
143
+ "$ > ol > li > p:first-child": { marginTop: "1.25em" },
144
+ "$ > ol > li > p:last-child": { marginBottom: "1.25em" },
145
+ "$ ul ul, $ ul ol, $ ol ul, $ ol ol": {
146
+ marginTop: "0.75em",
147
+ marginBottom: "0.75em"
148
+ },
149
+ "$ dl": {
150
+ marginTop: "1.25em",
151
+ marginBottom: "1.25em"
152
+ },
153
+ "$ dt": {
154
+ color: "var(--pk-prose-color-headings)",
155
+ fontWeight: "600",
156
+ marginTop: "1.25em"
157
+ },
158
+ "$ dd": {
159
+ marginTop: "0.5em",
160
+ paddingLeft: "1.625em"
161
+ }
162
+ }],
163
+ ["prose-hr", {
164
+ "$ hr": {
165
+ borderColor: "var(--pk-prose-color-hr)",
166
+ borderTopStyle: "solid",
167
+ borderTopWidth: "1px",
168
+ marginTop: "3em",
169
+ marginBottom: "3em"
170
+ },
171
+ "$ hr + *": { marginTop: "0" }
172
+ }],
173
+ ["prose-headings", {
174
+ "$ h1": {
175
+ color: "var(--pk-prose-color-headings)",
176
+ fontWeight: "800",
177
+ fontSize: "2.25em",
178
+ marginTop: "0",
179
+ marginBottom: "0.88em",
180
+ lineHeight: "1.1"
181
+ },
182
+ "$ h1 strong": { fontWeight: "900" },
183
+ "$ h1 code": { color: "inherit" },
184
+ "$ h2": {
185
+ color: "var(--pk-prose-color-headings)",
186
+ fontWeight: "700",
187
+ fontSize: "1.5em",
188
+ marginTop: "2em",
189
+ marginBottom: "1em",
190
+ lineHeight: "1.33"
191
+ },
192
+ "$ h2 strong": { fontWeight: "800" },
193
+ "$ h2 code": { color: "inherit" },
194
+ "$ h2 + *": { marginTop: "0" },
195
+ "$ h3": {
196
+ color: "var(--pk-prose-color-headings)",
197
+ fontWeight: "600",
198
+ fontSize: "1.25em",
199
+ marginTop: "1.6em",
200
+ marginBottom: "0.6em",
201
+ lineHeight: "1.6"
202
+ },
203
+ "$ h3 strong": { fontWeight: "700" },
204
+ "$ h3 code": { color: "inherit" },
205
+ "$ h3 + *": { marginTop: "0" },
206
+ "$ h4": {
207
+ color: "var(--pk-prose-color-headings)",
208
+ fontWeight: "600",
209
+ marginTop: "1.5em",
210
+ marginBottom: "0.5em",
211
+ lineHeight: "1.5"
212
+ },
213
+ "$ h4 strong": { fontWeight: "700" },
214
+ "$ h4 code": { color: "inherit" },
215
+ "$ h4 + *": { marginTop: "0" }
216
+ }],
217
+ ["prose-quotes", {
218
+ "$ blockquote": {
219
+ fontWeight: "500",
220
+ fontStyle: "italic",
221
+ color: "var(--pk-prose-color-quotes)",
222
+ borderLeftWidth: "0.25rem",
223
+ borderLeftColor: "var(--pk-prose-color-quote-borders)",
224
+ quotes: "\"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\"",
225
+ marginTop: "1.6em",
226
+ marginBottom: "1.6em",
227
+ paddingLeft: "1em"
228
+ },
229
+ "$ blockquote p:first-of-type::before": { content: "open-quote" },
230
+ "$ blockquote p:last-of-type::after": { content: "close-quote" },
231
+ "$ blockquote code": { color: "inherit" }
232
+ }],
233
+ ["prose-media", {
234
+ "$ img": {
235
+ marginTop: "2em",
236
+ marginBottom: "2em"
237
+ },
238
+ "$ picture": {
239
+ display: "block",
240
+ marginTop: "2em",
241
+ marginBottom: "2em"
242
+ },
243
+ "$ video": {
244
+ marginTop: "2em",
245
+ marginBottom: "2em"
246
+ },
247
+ "$ figure": {
248
+ marginTop: "2em",
249
+ marginBottom: "2em"
250
+ },
251
+ "$ figure > *": {
252
+ marginTop: "0",
253
+ marginBottom: "0"
254
+ },
255
+ "$ figcaption": {
256
+ color: "var(--pk-prose-color-captions)",
257
+ fontSize: "0.875em",
258
+ lineHeight: "1.4",
259
+ marginTop: "0.85em"
260
+ }
261
+ }],
262
+ ["prose-code", {
263
+ "$ code": {
264
+ color: "var(--pk-prose-color-code)",
265
+ fontWeight: "600",
266
+ fontSize: "0.875em"
267
+ },
268
+ "$ code::before": { content: "\"`\"" },
269
+ "$ code::after": { content: "\"`\"" },
270
+ "$ pre": {
271
+ color: "var(--pk-prose-color-pre-code)",
272
+ backgroundColor: "var(--pk-prose-color-pre-bg)",
273
+ overflowX: "auto",
274
+ fontWeight: "400",
275
+ fontSize: "0.875em",
276
+ lineHeight: "1.7",
277
+ marginTop: "1.7em",
278
+ marginBottom: "1.7em",
279
+ borderRadius: "0.375rem",
280
+ paddingTop: "0.85em",
281
+ paddingRight: "1.14em",
282
+ paddingBottom: "0.85em",
283
+ paddingLeft: "1.14em"
284
+ },
285
+ "$ pre code": {
286
+ backgroundColor: "transparent",
287
+ borderWidth: "0",
288
+ borderRadius: "0",
289
+ padding: "0",
290
+ fontWeight: "inherit",
291
+ color: "inherit",
292
+ fontSize: "inherit",
293
+ fontFamily: "inherit",
294
+ lineHeight: "inherit"
295
+ },
296
+ "$ pre code::before": { content: "none" },
297
+ "$ pre code::after": { content: "none" }
298
+ }],
299
+ ["prose-tables", {
300
+ "$ table": {
301
+ width: "100%",
302
+ tableLayout: "auto",
303
+ textAlign: "left",
304
+ marginTop: "2em",
305
+ marginBottom: "2em",
306
+ fontSize: "0.875em",
307
+ lineHeight: "1.7"
308
+ },
309
+ "$ thead": {
310
+ borderBottomWidth: "1px",
311
+ borderBottomColor: "var(--pk-prose-color-th-borders)"
312
+ },
313
+ "$ thead th": {
314
+ color: "var(--pk-prose-color-headings)",
315
+ fontWeight: "600",
316
+ verticalAlign: "bottom",
317
+ paddingRight: "0.57em",
318
+ paddingBottom: "0.57em",
319
+ paddingLeft: "0.57em"
320
+ },
321
+ "$ thead th:first-child": { paddingLeft: "0" },
322
+ "$ thead th:last-child": { paddingRight: "0" },
323
+ "$ thead th code": { color: "inherit" },
324
+ "$ tbody tr": {
325
+ borderBottomWidth: "1px",
326
+ borderBottomColor: "var(--pk-prose-color-td-borders)"
327
+ },
328
+ "$ tbody tr:last-child": { borderBottomWidth: "0" },
329
+ "$ tbody td": { verticalAlign: "baseline" },
330
+ "$ tbody td, $ tfoot td": {
331
+ paddingTop: "0.57em",
332
+ paddingRight: "0.57em",
333
+ paddingBottom: "0.57em",
334
+ paddingLeft: "0.57em"
335
+ },
336
+ "$ tbody td:first-child, $ tfoot td:first-child": { paddingLeft: "0" },
337
+ "$ tbody td:last-child, $ tfoot td:last-child": { paddingRight: "0" }
338
+ }]
492
339
  ];
493
340
  const proseSizeVariants = {
494
341
  "sm": {
package/package.json CHANGED
@@ -4,10 +4,10 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.51",
7
+ "version": "0.0.54",
8
8
  "author": "DevilTea <ch19980814@gmail.com>",
9
9
  "license": "MIT",
10
- "homepage": "https://pikacss.com",
10
+ "homepage": "https://pikacss.github.io",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/pikacss/pikacss.git",
@@ -39,10 +39,10 @@
39
39
  "node": ">=22"
40
40
  },
41
41
  "peerDependencies": {
42
- "@pikacss/core": "0.0.51"
42
+ "@pikacss/core": "0.0.54"
43
43
  },
44
44
  "devDependencies": {
45
- "@pikacss/core": "0.0.51"
45
+ "@pikacss/core": "0.0.54"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "tsdown",