Skip to content

Commit

Permalink
Add classname to codeblock component
Browse files Browse the repository at this point in the history
  • Loading branch information
huijing committed Dec 17, 2024
1 parent 8d442a2 commit 40fa143
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interledger/docs-design-system",
"version": "0.5.5",
"version": "0.6.0",
"type": "module",
"description": "Shared styles and components used across all Interledger Starlight documentation sites",
"exports": {
Expand Down
6 changes: 3 additions & 3 deletions src/components/CodeBlock.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
const { title } = Astro.props;
const { title, id, class: className } = Astro.props;
---
<div class="codeblock">
<div class:list={['codeblock', className]} id={id}>
<p>{title}</p>
<slot />
</div>
Expand All @@ -28,7 +28,7 @@ p {
font-size: var(--step--1);
font-weight: bold;
padding: var(--space-2xs) var(--space-xs);
background-color: var(--astro-code-color-background);
background-color: var(--sl-color-bg-inline-code);
border-bottom: 1px solid var(--sl-color-gray-5);
}
</style>
10 changes: 10 additions & 0 deletions src/styles/ilf-docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
border-radius: var(--border-radius);
}

.visually-hidden:not(:focus):not(:active) {
clip: rect(0 0 0 0);
clip-path: inset(100%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}

/* Main content area styles */
.main-frame {
font-size: var(--sl-text-body);
Expand Down

0 comments on commit 40fa143

Please sign in to comment.