Skip to content

Commit 55813dd

Browse files
committed
Sidebar: Stretch slection background colour
1 parent 571df42 commit 55813dd

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

assets/css/v2/style.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,10 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
794794
font-size: 0.875rem;
795795
}
796796

797+
.sidebar__container {
798+
width: var(--sidebar-width);
799+
}
800+
797801
.sidebar__container button {
798802
padding: 0.25rem 0.75rem;
799803
}
@@ -820,7 +824,7 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
820824
width: 100%;
821825
text-align: left;
822826
padding: 0.25rem 0.5rem;
823-
border-radius: 5px;
827+
border-radius: 5px 0 5px 0;
824828
font-weight: 500;
825829

826830
&:hover {
@@ -849,13 +853,14 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
849853

850854
.sidebar__toggle:has(.sidebar__chevron) {
851855
padding-left: .4rem;
856+
margin-left: -1rem;
852857
}
853858

854859
.sidebar__link {
855860
display: block;
856861
padding: 0.25rem 0.75rem;
857-
margin: 2px 0.5rem 2px 0;
858-
border-radius: 5px;
862+
margin: 2px 0 2px 0;
863+
border-radius: 5px 0 5px 0;
859864
color: oklch(0 0 0 / 0.75);
860865
text-decoration: none;
861866
transition: background-color 0.2s ease, color 0.2s ease;
@@ -870,7 +875,9 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
870875
color: oklch(var(--color-brand) / 1);
871876
background-color: oklch(var(--color-brand) / 0.1);
872877
font-weight: 600;
873-
width: fit-content;
878+
display: block; /* Make it stretch horizontally clearly */
879+
width: auto; /* reset width clearly */
880+
box-sizing: border-box;
874881
}
875882

876883
.sidebar__toc {

0 commit comments

Comments
 (0)