Skip to content

Commit 56edcb1

Browse files
committed
Improve sidebar styling for API reference
1 parent 03328bf commit 56edcb1

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

‎docs/great-docs.css‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ a.sidebar-item-toggle.text-start > i {
123123
color: #FAFAFD;
124124
}
125125

126-
a.sidebar-item-text.sidebar-link.active {
126+
#quarto-sidebar a.sidebar-item-text.sidebar-link.active {
127127
color: rgb(244, 121, 0);
128128
text-decoration: underline;
129-
text-decoration-thickness: 2px;
129+
text-decoration-thickness: 3px;
130130
text-decoration-color: rgba(101, 180, 237, 0.75);
131+
text-underline-offset: 3px;
131132
}
132133

133134
#api-reference > h1 {
@@ -151,10 +152,24 @@ a.sidebar-item-text.sidebar-link.active {
151152
background-color: #FAFAFD;
152153
}
153154

155+
/* Sidebar API items: monospace font with ellipsis for long names */
156+
#quarto-sidebar .sidebar-item-text {
157+
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
158+
font-size: 0.85em;
159+
overflow: hidden;
160+
text-overflow: ellipsis;
161+
white-space: nowrap;
162+
display: block;
163+
max-width: 100%;
164+
}
165+
166+
/* Keep section headers (categories) in their original sans-serif uppercase style */
154167
a.sidebar-item-text.sidebar-link.text-start > span {
155168
text-transform: uppercase;
156169
font-weight: 600;
157170
color: dimgray;
171+
font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
172+
font-size: 1em;
158173
}
159174

160175
.sidebar-menu-container {

‎great_docs/assets/styles.css‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ a.sidebar-item-toggle.text-start > i {
123123
color: #FAFAFD;
124124
}
125125

126-
a.sidebar-item-text.sidebar-link.active {
126+
#quarto-sidebar a.sidebar-item-text.sidebar-link.active {
127127
color: rgb(244, 121, 0);
128128
text-decoration: underline;
129-
text-decoration-thickness: 2px;
129+
text-decoration-thickness: 3px;
130130
text-decoration-color: rgba(101, 180, 237, 0.75);
131+
text-underline-offset: 3px;
131132
}
132133

133134
#api-reference > h1 {
@@ -151,10 +152,24 @@ a.sidebar-item-text.sidebar-link.active {
151152
background-color: #FAFAFD;
152153
}
153154

155+
/* Sidebar API items: monospace font with ellipsis for long names */
156+
#quarto-sidebar .sidebar-item-text {
157+
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
158+
font-size: 0.85em;
159+
overflow: hidden;
160+
text-overflow: ellipsis;
161+
white-space: nowrap;
162+
display: block;
163+
max-width: 100%;
164+
}
165+
166+
/* Keep section headers (categories) in their original sans-serif uppercase style */
154167
a.sidebar-item-text.sidebar-link.text-start > span {
155168
text-transform: uppercase;
156169
font-weight: 600;
157170
color: dimgray;
171+
font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
172+
font-size: 1em;
158173
}
159174

160175
.sidebar-menu-container {

0 commit comments

Comments
 (0)