Skip to content

Commit 3e7a51b

Browse files
committed
Modify image borders and orange theme highlight
1 parent 2da86b1 commit 3e7a51b

File tree

7 files changed

+47
-15
lines changed

7 files changed

+47
-15
lines changed

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.4",
3+
"version": "0.4.0",
44
"type": "module",
55
"description": "Shared styles and components used across all Interledger Starlight documentation sites",
66
"exports": {

src/components/LargeImg.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ img[src$='.svg' i] {
2323

2424
.border {
2525
border-radius: var(--border-radius);
26-
box-shadow: var(--sl-shadow-sm);
27-
border: 1px solid var(--sl-color-hairline-light);
26+
box-shadow: var(--box-shadow);
27+
border: 2px solid var(--color-accent-transparent);
2828
}
2929

3030
a {

src/components/Mermaid.astro

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@ interface Props {
33
graph: string;
44
}
55
6-
const { graph } = Astro.props;
6+
const { graph, hasBorder = false } = Astro.props;
77
---
88

9-
<pre class="mermaid" set:html={graph} />
9+
{hasBorder ? <pre class="mermaid border" set:html={graph} /> : <pre class="mermaid" set:html={graph} />}
10+
1011

1112
<style>
12-
pre.mermaid {
13+
pre.mermaid.mermaid {
1314
background-color: transparent;
15+
padding: 0;
16+
border-color: transparent;
17+
}
18+
19+
pre.border {
20+
border-radius: var(--border-radius);
21+
box-shadow: var(--box-shadow);
22+
border: 2px solid var(--color-accent-transparent);
1423
}
1524
</style>
1625

src/components/MermaidWrapper.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ div {
1919

2020
.border :global(svg) {
2121
border-radius: var(--border-radius);
22-
box-shadow: var(--sl-shadow-sm);
23-
border: 1px solid var(--sl-color-hairline-light);
22+
box-shadow: var(--box-shadow);
23+
border: 2px solid var(--color-accent-transparent);
24+
padding: var(--space-2xs);
2425
}
2526

2627
button {

src/styles/ilf-docs.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,19 @@
281281
table,
282282
pre:not(.mermaid),
283283
.starlight-aside,
284-
.img-outline,
285284
.expressive-code {
286285
border-radius: var(--border-radius);
287286
box-shadow: var(--sl-shadow-sm);
288287
}
289288

290-
code {
289+
code,
290+
img {
291291
border-radius: var(--border-radius);
292292
}
293293

294294
.img-outline {
295-
border: 1px solid var(--sl-color-hairline-light);
295+
border: 2px solid var(--color-accent-transparent);
296+
box-shadow: var(--box-shadow);
296297
}
297298

298299
.mermaid > svg {
@@ -310,6 +311,14 @@ p.starlight-aside__title + section.starlight-aside__content {
310311
margin-block-start: var(--space-2xs);
311312
}
312313

314+
/* Card style overrides */
315+
article.card {
316+
border-radius: var(--border-radius);
317+
border-color: var(--color-accent-transparent);
318+
border-width: 2px;
319+
box-shadow: var(--box-shadow);
320+
}
321+
313322
/* Tab style overrides */
314323
starlight-tabs pre {
315324
box-shadow: none;
@@ -423,7 +432,6 @@ thead tr:first-of-type th:last-of-type {
423432
}
424433

425434
.sl-markdown-content.sl-markdown-content pre:not(:where(.not-content *)) {
426-
border: 0;
427435
padding: var(--space-xs);
428436
}
429437

@@ -465,6 +473,10 @@ thead tr:first-of-type th:last-of-type {
465473
margin-block-start: initial;
466474
}
467475

476+
pre.astro-code {
477+
border: 0;
478+
}
479+
468480
/* Input styles */
469481
label {
470482
font-size: var(--sl-text-body-sm);

src/styles/orange-theme.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
--sl-color-accent-low: hsl(var(--sl-hue-accent), 55%, 12%); /* darkest */
77
--sl-color-accent: hsl(var(--sl-hue-accent), 98%, 41%);
88
--sl-color-accent-high: hsl(var(--sl-hue-accent), 100%, 87%); /* lightest */
9-
--color-accent-highlight: hsl(176, 92%, 25%);
9+
--color-accent-highlight: var(--sl-color-accent);
10+
--color-accent-transparent: hsla(var(--sl-hue-accent), 100%, 87%, 0.8);
11+
--box-shadow: var(--sl-shadow-sm);
1012
}
1113

1214
:root[data-theme="light"],
@@ -15,5 +17,8 @@
1517
--sl-color-accent-high: hsl(var(--sl-hue-accent), 100%, 29%); /* darkest */
1618
--sl-color-accent: hsl(var(--sl-hue-accent), 98%, 41%);
1719
--sl-color-accent-low: hsl(var(--sl-hue-accent), 100%, 97%); /* lightest */
18-
--color-accent-highlight: hsl(165, 90%, 78%);
20+
--color-accent-highlight: hsl(27, 100%, 80%);
21+
--color-accent-transparent: hsla(27, 100%, 80%, 0.5);
22+
--box-shadow: 0px 1px 1px hsla(27, 100%, 80%, 0.15),
23+
1px 2px 2px hsla(27, 100%, 80%, 0.15);
1924
}

src/styles/teal-theme.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Green theme for specification docs */
1+
/* Teal theme for specification docs */
22
:root,
33
::backdrop {
44
/* Colors (dark mode) */
@@ -7,6 +7,8 @@
77
--sl-color-accent: hsl(var(--sl-hue-accent), 100%, 23%);
88
--sl-color-accent-high: hsl(var(--sl-hue-accent), 100%, 87%); /* lightest */
99
--color-accent-highlight: hsl(176, 92%, 25%);
10+
--color-accent-transparent: hsla(176, 92%, 25%, 0.7);
11+
--box-shadow: var(--sl-shadow-sm);
1012
}
1113

1214
:root[data-theme="light"],
@@ -16,4 +18,7 @@
1618
--sl-color-accent: hsl(var(--sl-hue-accent), 100%, 23%);
1719
--sl-color-accent-low: hsl(var(--sl-hue-accent), 100%, 97%); /* lightest */
1820
--color-accent-highlight: hsl(165, 90%, 78%);
21+
--color-accent-transparent: hsla(var(--sl-hue-accent), 100%, 23%, 0.3);
22+
--box-shadow: 0px 1px 1px hsla(var(--sl-hue-accent), 100%, 23%, 0.1),
23+
1px 2px 2px hsla(var(--sl-hue-accent), 100%, 23%, 0.1);
1924
}

0 commit comments

Comments
 (0)