Skip to content

Commit 40fa143

Browse files
committed
Add classname to codeblock component
1 parent 8d442a2 commit 40fa143

File tree

3 files changed

+14
-4
lines changed

3 files changed

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

src/components/CodeBlock.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
const { title } = Astro.props;
2+
const { title, id, class: className } = Astro.props;
33
---
4-
<div class="codeblock">
4+
<div class:list={['codeblock', className]} id={id}>
55
<p>{title}</p>
66
<slot />
77
</div>
@@ -28,7 +28,7 @@ p {
2828
font-size: var(--step--1);
2929
font-weight: bold;
3030
padding: var(--space-2xs) var(--space-xs);
31-
background-color: var(--astro-code-color-background);
31+
background-color: var(--sl-color-bg-inline-code);
3232
border-bottom: 1px solid var(--sl-color-gray-5);
3333
}
3434
</style>

src/styles/ilf-docs.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@
5858
border-radius: var(--border-radius);
5959
}
6060

61+
.visually-hidden:not(:focus):not(:active) {
62+
clip: rect(0 0 0 0);
63+
clip-path: inset(100%);
64+
height: 1px;
65+
overflow: hidden;
66+
position: absolute;
67+
white-space: nowrap;
68+
width: 1px;
69+
}
70+
6171
/* Main content area styles */
6272
.main-frame {
6373
font-size: var(--sl-text-body);

0 commit comments

Comments
 (0)