Skip to content

Commit 4086187

Browse files
authored
Merge pull request #17 from interledger/chj/mermaid-component-updates
fix: adjust styling for diagrams smaller than content width
2 parents 626cf45 + a3c0980 commit 4086187

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Interledger documentation design system
22

3-
Interledger uses Starlight (powered by Astro) for all its documentation sites. We have 2 visual themes, green for specification documentation and orange for product documentation. These themes are built on top of Starlight's defaults and overrides some of the out-of-the-box styling. They are just CSS files, so use them with the path to `node_modules`. Unfortunately, we did not have enough braincells to figure out how to make it prettier than that. To use them in the `astro.config.mjs`:
3+
Interledger uses Starlight (powered by Astro) for all its documentation sites. We have 2 visual themes for now, teal and orange. These themes are built on top of Starlight's defaults and overrides some of the out-of-the-box styling. They are just CSS files, so use them with the path to `node_modules`. Unfortunately, we did not have enough braincells to figure out how to make it prettier than that. To use them in the `astro.config.mjs`:
44

55
```mjs
66
export default defineConfig({
77
integrations: [
88
starlight({
99
customCss: [
10-
"./node_modules/@interledger/docs-design-system/src/styles/green-theme.css",
10+
"./node_modules/@interledger/docs-design-system/src/styles/teal-theme.css",
1111
"./node_modules/@interledger/docs-design-system/src/styles/ilf-docs.css",
1212
],
1313
}),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@interledger/docs-design-system",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"type": "module",
55
"description": "Shared styles and components used across all Interledger Starlight documentation sites",
66
"exports": {

src/components/Mermaid.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ const { graph } = Astro.props;
88

99
<pre class="mermaid" set:html={graph} />
1010

11+
<style>
12+
pre.mermaid {
13+
background-color: transparent;
14+
}
15+
</style>
16+
1117
<script>
1218
import mermaid from "/node_modules/mermaid/dist/mermaid.esm.min.mjs";
1319
mermaid.initialize({ startOnLoad: true });

src/components/MermaidWrapper.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const { hasBorder = true } = Astro.props;
1313

1414
<style>
1515
div {
16-
text-align: right;
1716
margin-top: var(--space-m);
1817
}
1918

0 commit comments

Comments
 (0)