forked from space-wizards/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Styling changes, Mermaid sequence diagrams styling
Update Mermaid to v11.3.0 (gotten from https://unpkg.com/[email protected]/dist/mermaid.min.js) Styles are now compiled into one CSS file with Sass. Added theming for Mermaid sequence diagrams, works great on both light and dark modes.
- Loading branch information
Showing
9 changed files
with
1,925 additions
and
711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Build with | ||
// sass ./scss/main.scss ./theme/compiled/ss14.css | ||
// Get sass with "npm install -g sass" | ||
|
||
@use "ss14"; | ||
@use "ss14-mermaid.scss"; | ||
@use "mdbook-admonish"; | ||
@use "nav-style"; | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// These all have to be !important because Mermaid sets all of them based on ID matches, which sucks. | ||
|
||
html { | ||
--mermaid-sequence-actor-bg: #2d4c5a; | ||
--mermaid-sequence-actor-stroke: #2a3355; | ||
|
||
--mermaid-sequence-note-bg: #2d5a44; | ||
--mermaid-sequence-note-stroke: #253d31; | ||
|
||
--mermaid-sequence-rect-bg: #21273C; | ||
} | ||
|
||
// Light themes. | ||
.light, .rust { | ||
--mermaid-sequence-actor-bg: #cde498; | ||
--mermaid-sequence-actor-stroke: #a6cf47; | ||
|
||
--mermaid-sequence-note-bg: #fff5ad; | ||
--mermaid-sequence-note-stroke: #aaaa33; | ||
|
||
--mermaid-sequence-rect-bg: #abe5f3; | ||
} | ||
|
||
pre.mermaid svg[aria-roledescription="sequence"] { | ||
defs > #arrowhead > path { | ||
fill: var(--fg) !important; | ||
stroke: var(--fg) !important; | ||
} | ||
.actor { | ||
fill: var(--mermaid-sequence-actor-bg) !important; | ||
stroke: var(--mermaid-sequence-actor-stroke) !important; | ||
} | ||
|
||
.actor > tspan, .messageText, .loopText, .loopText > tspan, .noteText > tspan { | ||
fill: var(--fg) !important; | ||
} | ||
|
||
.actor-line, .messageLine0, .messageLine1, .loopLine { | ||
stroke: var(--fg) !important; | ||
} | ||
|
||
.note { | ||
fill: var(--mermaid-sequence-note-bg) !important; | ||
stroke: var(--mermaid-sequence-note-stroke) !important; | ||
} | ||
|
||
.rect { | ||
fill: var(--mermaid-sequence-rect-bg) !important; | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.