Skip to content

Commit

Permalink
Improve right sidebar layout (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis authored May 15, 2023
1 parent 5697de7 commit a49485d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-goats-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/starlight": patch
---

Improve right sidebar layout.
10 changes: 8 additions & 2 deletions packages/starlight/components/RightSidebarPanel.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
border-top: 1px solid var(--sl-color-hairline);
}
.container {
width: var(--sl-sidebar-width);
width: calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x));
}
.right-sidebar-panel :global(h2) {
color: var(--sl-color-white);
Expand All @@ -26,14 +26,20 @@
font-size: var(--sl-text-xs);
text-decoration: none;
color: var(--sl-color-gray-3);
word-break: break-word;
}
.right-sidebar-panel :global(a:hover) {
color: var(--sl-color-white);
}
@media (min-width: 72rem) {
.container {
max-width: calc(
100vw - var(--sl-content-width) - var(--sl-sidebar-width)
(
(
100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 *
var(--sl-sidebar-pad-x)
) * 0.25 /* MAGIC NUMBER 🥲 */
)
);
}
}
Expand Down

0 comments on commit a49485d

Please sign in to comment.