@marimo-team/islands 0.24.1-dev69 → 0.24.1-dev70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.24.1-dev69",
3
+ "version": "0.24.1-dev70",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -1,19 +1,8 @@
1
+ /* Tailwind scans Streamdown's compiled output for utility classes. */
2
+ /* stylelint-disable-next-line at-rule-no-unknown */
1
3
  @source "../../../node_modules/streamdown/dist/index.js";
2
4
 
3
5
  .mo-markdown-renderer {
4
- /* Make headers a bit smaller */
5
- --text-2xl: 1rem;
6
- --text-3xl: 1.2rem;
7
-
8
- h1,
9
- h2,
10
- h3,
11
- h4,
12
- h5,
13
- h6 {
14
- margin-top: 10px;
15
- }
16
-
17
6
  hr {
18
7
  margin-top: 8px;
19
8
  margin-bottom: 12px;
@@ -2,6 +2,7 @@
2
2
  import "./islands.css";
3
3
  import "../../css/common.css";
4
4
  import "../../css/globals.css";
5
+ import "../../css/markdown-typography.css";
5
6
  import "../../css/codehilite.css";
6
7
  import "../../css/katex.min.css";
7
8
  import "../../css/md.css";
package/src/css/index.css CHANGED
@@ -1,4 +1,5 @@
1
1
  @import url("./globals.css");
2
+ @import url("./markdown-typography.css");
2
3
  @import url("./codehilite.css");
3
4
  @import url("./common.css");
4
5
  @import url("./katex-fonts.css");
@@ -0,0 +1,51 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ :is(.markdown, .mo-markdown-renderer) {
4
+ :is(h1, h2, h3, h4, h5, h6) {
5
+ font-family: var(--heading-font);
6
+ font-weight: inherit;
7
+ margin-block: 1.5rem 1rem;
8
+ line-height: 1.25;
9
+ }
10
+
11
+ /* Keep heading sizes relative to the renderer text size. */
12
+ /* stylelint-disable unit-allowed-list */
13
+
14
+ h1 {
15
+ font-size: 2.25em;
16
+ }
17
+
18
+ h2 {
19
+ font-size: 1.5em;
20
+ }
21
+
22
+ h3 {
23
+ font-size: 1.25em;
24
+ }
25
+
26
+ :is(h4, h5, h6) {
27
+ font-size: 1em;
28
+ }
29
+
30
+ /* stylelint-enable unit-allowed-list */
31
+
32
+ :is(ul, ol) > li {
33
+ margin-block: 0;
34
+ padding-block: 0;
35
+ }
36
+ }
37
+
38
+ :is(.markdown, .mo-markdown-renderer) table {
39
+ font-variant-numeric: tabular-nums;
40
+ }
41
+
42
+ :is(.markdown, .mo-markdown-renderer)
43
+ > :is(h1, h2, h3, h4, h5, h6, p, .paragraph, ul, ol, blockquote) {
44
+ max-inline-size: var(--markdown-max-width);
45
+ }
46
+
47
+ @supports (text-wrap: balance) {
48
+ :is(.markdown, .mo-markdown-renderer) :is(h1, h2, h3, h4, h5, h6) {
49
+ text-wrap: balance;
50
+ }
51
+ }
package/src/css/md.css CHANGED
@@ -12,11 +12,6 @@
12
12
  margin-block-end: 0;
13
13
  }
14
14
 
15
- .markdown ul li,
16
- .markdown ol li {
17
- margin-block: 0;
18
- }
19
-
20
15
  /* Restore browser default bullet cycling that Tailwind Typography overrides */
21
16
  .markdown ul ul {
22
17
  list-style-type: revert;
@@ -41,28 +36,6 @@
41
36
  margin-inline: 0;
42
37
  }
43
38
 
44
- .markdown h1,
45
- .markdown h2,
46
- .markdown h3,
47
- .markdown h4,
48
- .markdown h5,
49
- .markdown h6 {
50
- font-weight: inherit;
51
- font-family: var(--heading-font);
52
-
53
- /*
54
- Anchor heading spacing to GitHub's markdown rhythm (Primer): a uniform
55
- 24px top / 16px bottom margin and 1.25 line-height across every level,
56
- letting font-size — not margin — carry the hierarchy. Tailwind Typography's
57
- prose defaults scale heading margins per-level up to ~2em (≈48px on h2),
58
- which is tuned for long-form articles and reads as too airy in a notebook.
59
- Ref: https://github.com/sindresorhus/github-markdown-css
60
- */
61
- margin-top: 1.5rem;
62
- margin-bottom: 1rem;
63
- line-height: 1.25;
64
- }
65
-
66
39
  .markdown hr {
67
40
  margin-block: 0.5rem;
68
41
  }