hd-garden 0.8.1 → 0.8.2
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.
|
@@ -92,8 +92,11 @@ export function ArticleMeasure() {
|
|
|
92
92
|
const articleBox = (article.querySelector(".markdown-body") ?? article).getBoundingClientRect();
|
|
93
93
|
const viewport = root.clientWidth;
|
|
94
94
|
let docMaxRoom: number | null = null;
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
// A left rail (the doc sidebar, or a column's article list) bounds the
|
|
96
|
+
// breakout on both sides, so wide content never runs under it.
|
|
97
|
+
const columnNav = docPage ? null : document.querySelector<HTMLElement>(".series-nav");
|
|
98
|
+
if (docPage || columnNav) {
|
|
99
|
+
const sidebar = docPage ? docPage.querySelector<HTMLElement>(".gdoc-sidebar") : columnNav;
|
|
97
100
|
let leftLimit = 24;
|
|
98
101
|
if (sidebar && getComputedStyle(sidebar).position === "sticky") {
|
|
99
102
|
const sbBox = sidebar.getBoundingClientRect();
|
|
@@ -102,7 +105,7 @@ export function ArticleMeasure() {
|
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
let rightLimit = viewport - 24;
|
|
105
|
-
if (toc && getComputedStyle(toc).display !== "none") {
|
|
108
|
+
if (docPage && toc && getComputedStyle(toc).display !== "none") {
|
|
106
109
|
const tocBox = toc.getBoundingClientRect();
|
|
107
110
|
if (tocBox.width > 0 && tocBox.left >= articleBox.right - 1) {
|
|
108
111
|
rightLimit = tocBox.left - translatedX(toc) - 16;
|
|
@@ -25,10 +25,11 @@ function renderMermaid(source: string, id: string) {
|
|
|
25
25
|
themeVariables: {
|
|
26
26
|
darkMode: dark,
|
|
27
27
|
background: token("--paper"),
|
|
28
|
-
primaryColor: token("--
|
|
29
|
-
primaryBorderColor: token("--
|
|
28
|
+
primaryColor: token("--paper"),
|
|
29
|
+
primaryBorderColor: token("--ink"),
|
|
30
30
|
primaryTextColor: token("--ink"),
|
|
31
|
-
|
|
31
|
+
textColor: token("--ink"),
|
|
32
|
+
lineColor: token("--ink"),
|
|
32
33
|
secondaryColor: token("--well"),
|
|
33
34
|
tertiaryColor: token("--well"),
|
|
34
35
|
fontSize: "14px",
|
package/app/globals.css
CHANGED
|
@@ -2160,6 +2160,22 @@ button {
|
|
|
2160
2160
|
margin: 7px 0;
|
|
2161
2161
|
}
|
|
2162
2162
|
|
|
2163
|
+
/* Loose lists (items separated by blank lines) render li > p. The item keeps
|
|
2164
|
+
the list rhythm; paragraphs only space apart inside the same item. */
|
|
2165
|
+
.markdown-body :is(ol, ul):not(.g-steps) > li > p {
|
|
2166
|
+
margin: 0;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
.markdown-body li > p + p,
|
|
2170
|
+
.markdown-body li > p + :is(pre, blockquote, figure, .table-wrap),
|
|
2171
|
+
.markdown-body li > :is(pre, blockquote, figure, .table-wrap) + p {
|
|
2172
|
+
margin-top: 12px;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
.markdown-body li > p:empty {
|
|
2176
|
+
display: none;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2163
2179
|
.markdown-body li::marker {
|
|
2164
2180
|
color: var(--accent);
|
|
2165
2181
|
}
|
|
@@ -2611,7 +2627,7 @@ button {
|
|
|
2611
2627
|
|
|
2612
2628
|
.markdown-body .mermaid-block {
|
|
2613
2629
|
margin: 34px 0;
|
|
2614
|
-
background:
|
|
2630
|
+
background: transparent;
|
|
2615
2631
|
border: 1px solid var(--line);
|
|
2616
2632
|
}
|
|
2617
2633
|
|
|
@@ -5724,3 +5740,25 @@ html[data-theme="dark"] .search-footer {
|
|
|
5724
5740
|
transition: transform 220ms ease, visibility 0s;
|
|
5725
5741
|
}
|
|
5726
5742
|
}
|
|
5743
|
+
|
|
5744
|
+
/* Mermaid sits on the page: no fills, body-text ink for lines and labels, so
|
|
5745
|
+
it reads in both themes. !important beats the svg's own id-scoped styles. */
|
|
5746
|
+
.g-mermaid svg { background: transparent !important; }
|
|
5747
|
+
.g-mermaid svg :is(.node, .cluster, .actor, .labelBox, .edgeLabel, .labelBkg) :is(rect, polygon, circle, ellipse, path),
|
|
5748
|
+
.g-mermaid svg :is(rect.actor, .edgeLabel rect, .labelBkg, rect.background) {
|
|
5749
|
+
fill: transparent !important;
|
|
5750
|
+
stroke: var(--ink) !important;
|
|
5751
|
+
}
|
|
5752
|
+
.g-mermaid svg :is(.edgeLabel, .labelBkg) rect { stroke: none !important; }
|
|
5753
|
+
.g-mermaid svg :is(.edgeLabel, .labelBkg) { background: transparent !important; }
|
|
5754
|
+
.g-mermaid svg :is(.flowchart-link, .edgePath path, .messageLine0, .messageLine1, .relation, .transition, line) {
|
|
5755
|
+
stroke: var(--ink) !important;
|
|
5756
|
+
}
|
|
5757
|
+
.g-mermaid svg :is(marker path, .arrowheadPath, .arrowMarkerPath, marker) {
|
|
5758
|
+
fill: var(--ink) !important;
|
|
5759
|
+
stroke: var(--ink) !important;
|
|
5760
|
+
}
|
|
5761
|
+
.g-mermaid svg :is(text, tspan, .nodeLabel, .edgeLabel, .label, .messageText, .actor > tspan) {
|
|
5762
|
+
fill: var(--ink) !important;
|
|
5763
|
+
color: var(--ink) !important;
|
|
5764
|
+
}
|