Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from lorenzolewis/feat/refactor-horizontal-styles
Browse files Browse the repository at this point in the history
Refactor Default Styles
  • Loading branch information
lorenzolewis authored May 20, 2024
2 parents 308c0c8 + 668249b commit bc444db
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
7 changes: 7 additions & 0 deletions .changeset/friendly-sloths-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@lorenzo_lewis/starlight-multi-sidebar": patch
---

Refactor horizontal tab styles.

If you are familiar with Astro docs prior to the Starlight migration this may look familiar 😉
4 changes: 2 additions & 2 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
site: "https://starlight-multi-sidebar.pages.dev",
integrations: [
starlight({
title: "🗃️ Starlight Multi-Sidebar",
title: "🗄️ Starlight Multi-Sidebar",
social: {
github: "https://github.com/lorenzolewis/starlight-multi-sidebar",
},
Expand All @@ -24,7 +24,7 @@ export default defineConfig({
},
],
plugins: [
starlightMultiSidebar({ switcherStyle: "dropdown" }),
starlightMultiSidebar({ switcherStyle: "horizontalList" }),
starlightLinksValidatorPlugin(),
],
}),
Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: 🗃️ Starlight Multi-Sidebar
description: Use multiple sidebars with your Starlight site.
title: 🗄️ Starlight Multi-Sidebar
description: Enable multiple sidebars with your Starlight site.
hero:
tagline: Use multiple sidebars with your Starlight site.
tagline: Enable multiple sidebars with your Starlight site.
image:
file: ../../assets/houston.webp
actions:
Expand Down
4 changes: 2 additions & 2 deletions packages/starlight-multi-sidebar/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
export default defineConfig({
integrations: [
starlight({
title: "🗃️ Starlight Multi-Sidebar",
title: "🗄️ Starlight Multi-Sidebar",
+ plugins: [starlightMultiSidebar()],
- plugins: [starlightMultiSidebar],
}),
Expand All @@ -44,7 +44,7 @@
export default defineConfig({
integrations: [
starlight({
title: "🗃️ Starlight Multi-Sidebar",
title: "🗄️ Starlight Multi-Sidebar",
plugins: [
starlightMultiSidebar({
switcherStyle: "dropdown",
Expand Down
39 changes: 16 additions & 23 deletions packages/starlight-multi-sidebar/components/HorizontalList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ const sidebars = Astro.props.multiSidebarData.map((sidebar) => {
))
}
</starlight-multi-sidebar-tabs>
<style>
.__collapse > input {
/* Layout */
position: relative;
display: inline-flex;
grid-row-start: 1;
appearance: none;
width: 100%;
min-height: fit-content;
}
</style>
<style>
starlight-tabs {
display: block;
Expand All @@ -91,26 +80,30 @@ const sidebars = Astro.props.multiSidebarData.map((sidebar) => {
}

[role="tablist"] {
display: flex;
display: grid;
grid-auto-flow: column;
grid-auto-columns: 1fr;
justify-content: space-around;
list-style: none;
padding: 0;
margin-bottom: var(--sl-nav-pad-y);
padding-inline: 0.5rem;
padding-block-end: var(--sl-nav-pad-y);
}

.tab > [role="tab"] {
display: block;
border-radius: 0.25rem;
padding-inline: 0.5rem;
font-size: var(--sl-text-lg);
font-weight: 600;
cursor: pointer;
text-align: center;
font-size: var(--sl-text-base);
font-weight: 400;
text-decoration: none;
color: canvastext;
min-height: fit-content;
color: var(--sl-color-gray-2);
border-bottom: 1px solid var(--sl-color-gray-5);
padding-inline: 0.2rem;
}
.tab [role="tab"][aria-selected="true"] {
color: var(--sl-color-text-invert);
background-color: var(--sl-color-text-accent);
font-weight: 600;
border-width: 2px;
border-color: var(--sl-color-text-accent);
color: var(--sl-color-white);
}
</style>

Expand Down
2 changes: 1 addition & 1 deletion packages/starlight-multi-sidebar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Lorenzo Lewis",
"version": "0.1.2",
"license": "MIT",
"description": "Use multiple sidebars with your Starlight site.",
"description": "Enable multiple sidebars with your Starlight site.",
"type": "module",
"exports": {
".": "./index.ts",
Expand Down

0 comments on commit bc444db

Please sign in to comment.