From 55035591ef2171cef5a875f21643de500f437b38 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 28 Sep 2024 16:25:32 -0600 Subject: [PATCH] add new --- docs/releases/0.6.7.md | 1 - docs/tour/imports.md | 6 - docs/tour/style.md | 6 +- static/d2/styles-fill.d2 | 2 + static/img/generated/styles-fill.svg2 | 312 +++++++++++++------------- 5 files changed, 163 insertions(+), 164 deletions(-) diff --git a/docs/releases/0.6.7.md b/docs/releases/0.6.7.md index ba3af222..e2b2152f 100644 --- a/docs/releases/0.6.7.md +++ b/docs/releases/0.6.7.md @@ -35,5 +35,4 @@ - CLI: fixes scale flag not being passed to animated SVG outputs [#2071](https://github.com/terrastruct/d2/pull/2071) - CLI: pptx exports use theme flags correctly [#2099](https://github.com/terrastruct/d2/pull/2099) - Imports: importing files with url links is fixed [#2105](https://github.com/terrastruct/d2/pull/2105) -- Vars: substitutions consistently appear in the specified order [#2116](https://github.com/terrastruct/d2/pull/2116) - Composition: linking to invalid boards no longer produces an invalid link [#2118](https://github.com/terrastruct/d2/pull/2118) diff --git a/docs/tour/imports.md b/docs/tour/imports.md index cf4d61a7..1970a1c6 100644 --- a/docs/tour/imports.md +++ b/docs/tour/imports.md @@ -123,9 +123,3 @@ Unnecessary relative imports are removed by autoformat. `@./x` will be autoformatted to `@x`. ::: - -:::caution -Absolute imports are not currently available. We are considering designs to set a root, so -that you can import like `@~/my/d2/x.d2`. If you have a use case for absolute imports, -please file an issue (or upvote an existing one) on GitHub. -::: diff --git a/docs/tour/style.md b/docs/tour/style.md index 60e490e9..4a9adef7 100644 --- a/docs/tour/style.md +++ b/docs/tour/style.md @@ -68,7 +68,7 @@ Float between `0` and `1`. ## Stroke -CSS color name or hex code. +CSS color name, hex code, or a subset of CSS gradient strings. {StylesStroke} @@ -85,7 +85,7 @@ already used to control header's `fill`). ## Fill -CSS color name or hex code. +CSS color name, hex code, or a subset of CSS gradient strings. {StylesFill} @@ -228,7 +228,7 @@ Integer between `8` and `100`. ## Font Color -CSS color name or hex code. +CSS color name, hex code, or a subset of CSS gradient strings. {StylesFontColor} diff --git a/static/d2/styles-fill.d2 b/static/d2/styles-fill.d2 index f82f20b7..5c6d19c3 100644 --- a/static/d2/styles-fill.d2 +++ b/static/d2/styles-fill.d2 @@ -1,4 +1,6 @@ direction: right x -> y: hi +y -> z x.style.fill: "#f4a261" y.style.fill: honeydew +z.style.fill: "linear-gradient(#f69d3c, #3f87a6)" diff --git a/static/img/generated/styles-fill.svg2 b/static/img/generated/styles-fill.svg2 index ff7fb3c4..f2488ec2 100644 --- a/static/img/generated/styles-fill.svg2 +++ b/static/img/generated/styles-fill.svg2 @@ -1,17 +1,17 @@ -xy hi - + .d2-569507680 .fill-N1{fill:#0A0F25;} + .d2-569507680 .fill-N2{fill:#676C7E;} + .d2-569507680 .fill-N3{fill:#9499AB;} + .d2-569507680 .fill-N4{fill:#CFD2DD;} + .d2-569507680 .fill-N5{fill:#DEE1EB;} + .d2-569507680 .fill-N6{fill:#EEF1F8;} + .d2-569507680 .fill-N7{fill:#FFFFFF;} + .d2-569507680 .fill-B1{fill:#0D32B2;} + .d2-569507680 .fill-B2{fill:#0D32B2;} + .d2-569507680 .fill-B3{fill:#E3E9FD;} + .d2-569507680 .fill-B4{fill:#E3E9FD;} + .d2-569507680 .fill-B5{fill:#EDF0FD;} + .d2-569507680 .fill-B6{fill:#F7F8FE;} + .d2-569507680 .fill-AA2{fill:#4A6FF3;} + .d2-569507680 .fill-AA4{fill:#EDF0FD;} + .d2-569507680 .fill-AA5{fill:#F7F8FE;} + .d2-569507680 .fill-AB4{fill:#EDF0FD;} + .d2-569507680 .fill-AB5{fill:#F7F8FE;} + .d2-569507680 .stroke-N1{stroke:#0A0F25;} + .d2-569507680 .stroke-N2{stroke:#676C7E;} + .d2-569507680 .stroke-N3{stroke:#9499AB;} + .d2-569507680 .stroke-N4{stroke:#CFD2DD;} + .d2-569507680 .stroke-N5{stroke:#DEE1EB;} + .d2-569507680 .stroke-N6{stroke:#EEF1F8;} + .d2-569507680 .stroke-N7{stroke:#FFFFFF;} + .d2-569507680 .stroke-B1{stroke:#0D32B2;} + .d2-569507680 .stroke-B2{stroke:#0D32B2;} + .d2-569507680 .stroke-B3{stroke:#E3E9FD;} + .d2-569507680 .stroke-B4{stroke:#E3E9FD;} + .d2-569507680 .stroke-B5{stroke:#EDF0FD;} + .d2-569507680 .stroke-B6{stroke:#F7F8FE;} + .d2-569507680 .stroke-AA2{stroke:#4A6FF3;} + .d2-569507680 .stroke-AA4{stroke:#EDF0FD;} + .d2-569507680 .stroke-AA5{stroke:#F7F8FE;} + .d2-569507680 .stroke-AB4{stroke:#EDF0FD;} + .d2-569507680 .stroke-AB5{stroke:#F7F8FE;} + .d2-569507680 .background-color-N1{background-color:#0A0F25;} + .d2-569507680 .background-color-N2{background-color:#676C7E;} + .d2-569507680 .background-color-N3{background-color:#9499AB;} + .d2-569507680 .background-color-N4{background-color:#CFD2DD;} + .d2-569507680 .background-color-N5{background-color:#DEE1EB;} + .d2-569507680 .background-color-N6{background-color:#EEF1F8;} + .d2-569507680 .background-color-N7{background-color:#FFFFFF;} + .d2-569507680 .background-color-B1{background-color:#0D32B2;} + .d2-569507680 .background-color-B2{background-color:#0D32B2;} + .d2-569507680 .background-color-B3{background-color:#E3E9FD;} + .d2-569507680 .background-color-B4{background-color:#E3E9FD;} + .d2-569507680 .background-color-B5{background-color:#EDF0FD;} + .d2-569507680 .background-color-B6{background-color:#F7F8FE;} + .d2-569507680 .background-color-AA2{background-color:#4A6FF3;} + .d2-569507680 .background-color-AA4{background-color:#EDF0FD;} + .d2-569507680 .background-color-AA5{background-color:#F7F8FE;} + .d2-569507680 .background-color-AB4{background-color:#EDF0FD;} + .d2-569507680 .background-color-AB5{background-color:#F7F8FE;} + .d2-569507680 .color-N1{color:#0A0F25;} + .d2-569507680 .color-N2{color:#676C7E;} + .d2-569507680 .color-N3{color:#9499AB;} + .d2-569507680 .color-N4{color:#CFD2DD;} + .d2-569507680 .color-N5{color:#DEE1EB;} + .d2-569507680 .color-N6{color:#EEF1F8;} + .d2-569507680 .color-N7{color:#FFFFFF;} + .d2-569507680 .color-B1{color:#0D32B2;} + .d2-569507680 .color-B2{color:#0D32B2;} + .d2-569507680 .color-B3{color:#E3E9FD;} + .d2-569507680 .color-B4{color:#E3E9FD;} + .d2-569507680 .color-B5{color:#EDF0FD;} + .d2-569507680 .color-B6{color:#F7F8FE;} + .d2-569507680 .color-AA2{color:#4A6FF3;} + .d2-569507680 .color-AA4{color:#EDF0FD;} + .d2-569507680 .color-AA5{color:#F7F8FE;} + .d2-569507680 .color-AB4{color:#EDF0FD;} + .d2-569507680 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}@media screen and (prefers-color-scheme:dark){ + .d2-569507680 .fill-N1{fill:#CDD6F4;} + .d2-569507680 .fill-N2{fill:#BAC2DE;} + .d2-569507680 .fill-N3{fill:#A6ADC8;} + .d2-569507680 .fill-N4{fill:#585B70;} + .d2-569507680 .fill-N5{fill:#45475A;} + .d2-569507680 .fill-N6{fill:#313244;} + .d2-569507680 .fill-N7{fill:#1E1E2E;} + .d2-569507680 .fill-B1{fill:#CBA6f7;} + .d2-569507680 .fill-B2{fill:#CBA6f7;} + .d2-569507680 .fill-B3{fill:#6C7086;} + .d2-569507680 .fill-B4{fill:#585B70;} + .d2-569507680 .fill-B5{fill:#45475A;} + .d2-569507680 .fill-B6{fill:#313244;} + .d2-569507680 .fill-AA2{fill:#f38BA8;} + .d2-569507680 .fill-AA4{fill:#45475A;} + .d2-569507680 .fill-AA5{fill:#313244;} + .d2-569507680 .fill-AB4{fill:#45475A;} + .d2-569507680 .fill-AB5{fill:#313244;} + .d2-569507680 .stroke-N1{stroke:#CDD6F4;} + .d2-569507680 .stroke-N2{stroke:#BAC2DE;} + .d2-569507680 .stroke-N3{stroke:#A6ADC8;} + .d2-569507680 .stroke-N4{stroke:#585B70;} + .d2-569507680 .stroke-N5{stroke:#45475A;} + .d2-569507680 .stroke-N6{stroke:#313244;} + .d2-569507680 .stroke-N7{stroke:#1E1E2E;} + .d2-569507680 .stroke-B1{stroke:#CBA6f7;} + .d2-569507680 .stroke-B2{stroke:#CBA6f7;} + .d2-569507680 .stroke-B3{stroke:#6C7086;} + .d2-569507680 .stroke-B4{stroke:#585B70;} + .d2-569507680 .stroke-B5{stroke:#45475A;} + .d2-569507680 .stroke-B6{stroke:#313244;} + .d2-569507680 .stroke-AA2{stroke:#f38BA8;} + .d2-569507680 .stroke-AA4{stroke:#45475A;} + .d2-569507680 .stroke-AA5{stroke:#313244;} + .d2-569507680 .stroke-AB4{stroke:#45475A;} + .d2-569507680 .stroke-AB5{stroke:#313244;} + .d2-569507680 .background-color-N1{background-color:#CDD6F4;} + .d2-569507680 .background-color-N2{background-color:#BAC2DE;} + .d2-569507680 .background-color-N3{background-color:#A6ADC8;} + .d2-569507680 .background-color-N4{background-color:#585B70;} + .d2-569507680 .background-color-N5{background-color:#45475A;} + .d2-569507680 .background-color-N6{background-color:#313244;} + .d2-569507680 .background-color-N7{background-color:#1E1E2E;} + .d2-569507680 .background-color-B1{background-color:#CBA6f7;} + .d2-569507680 .background-color-B2{background-color:#CBA6f7;} + .d2-569507680 .background-color-B3{background-color:#6C7086;} + .d2-569507680 .background-color-B4{background-color:#585B70;} + .d2-569507680 .background-color-B5{background-color:#45475A;} + .d2-569507680 .background-color-B6{background-color:#313244;} + .d2-569507680 .background-color-AA2{background-color:#f38BA8;} + .d2-569507680 .background-color-AA4{background-color:#45475A;} + .d2-569507680 .background-color-AA5{background-color:#313244;} + .d2-569507680 .background-color-AB4{background-color:#45475A;} + .d2-569507680 .background-color-AB5{background-color:#313244;} + .d2-569507680 .color-N1{color:#CDD6F4;} + .d2-569507680 .color-N2{color:#BAC2DE;} + .d2-569507680 .color-N3{color:#A6ADC8;} + .d2-569507680 .color-N4{color:#585B70;} + .d2-569507680 .color-N5{color:#45475A;} + .d2-569507680 .color-N6{color:#313244;} + .d2-569507680 .color-N7{color:#1E1E2E;} + .d2-569507680 .color-B1{color:#CBA6f7;} + .d2-569507680 .color-B2{color:#CBA6f7;} + .d2-569507680 .color-B3{color:#6C7086;} + .d2-569507680 .color-B4{color:#585B70;} + .d2-569507680 .color-B5{color:#45475A;} + .d2-569507680 .color-B6{color:#313244;} + .d2-569507680 .color-AA2{color:#f38BA8;} + .d2-569507680 .color-AA4{color:#45475A;} + .d2-569507680 .color-AA5{color:#313244;} + .d2-569507680 .color-AB4{color:#45475A;} + .d2-569507680 .color-AB5{color:#313244;}.appendix text.text{fill:#CDD6F4}.md{--color-fg-default:#CDD6F4;--color-fg-muted:#BAC2DE;--color-fg-subtle:#A6ADC8;--color-canvas-default:#1E1E2E;--color-canvas-subtle:#313244;--color-border-default:#CBA6f7;--color-border-muted:#CBA6f7;--color-neutral-muted:#313244;--color-accent-fg:#CBA6f7;--color-accent-emphasis:#CBA6f7;--color-attention-subtle:#BAC2DE;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-B3{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-B5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-AA4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AA5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB4{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-AB5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N1{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N2{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N5{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N6{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N7{fill:url(#streaks-darker);mix-blend-mode:lighten}.light-code{display: none}.dark-code{display: block}}]]> + + +xyz hi + +