Skip to content

Commit db3ead3

Browse files
authored
Merge pull request #221 from RoBorregos/feature/optimize-sidebar-performance
Optimize sidebar performance and enable instant navigation
2 parents 30fa570 + 09c450d commit db3ead3

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

docs/assets/stylesheets/extra.css

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,9 @@ body {
8181
box-shadow: none;
8282
}
8383

84-
/* Sidebar (left) navigation: make links dark/readable */
85-
.md-sidebar__scrollwrap {
86-
overflow-y: auto !important;
87-
height: 100%;
88-
position: relative;
89-
}
9084

9185
.md-sidebar__inner {
92-
height: 100%;
93-
overflow-y: auto;
86+
padding-top: 10px;
9487
}
9588

9689
/* Compact Sidebar */
@@ -122,19 +115,18 @@ body {
122115
color: var(--text);
123116
border-radius: 8px;
124117
padding: 8px 10px;
125-
transition: background .12s ease, transform .12s ease;
118+
transition: background .15s ease;
126119
}
127120

128121
.md-sidebar .md-nav__link:hover {
129122
background: rgba(11, 37, 69, 0.04);
130123
color: var(--primary);
131-
transform: translateX(3px);
132124
}
133125

134126
.md-sidebar .md-nav__link--active {
135-
background: linear-gradient(90deg, var(--primary), var(--accent));
127+
background: var(--primary);
136128
color: #fff !important;
137-
box-shadow: 0 6px 18px rgba(11, 37, 69, 0.12);
129+
font-weight: 600;
138130
}
139131

140132
/* Search box */

mkdocs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ theme:
66
favicon: "assets/favicon.png"
77
features:
88
- content.code.annotate
9+
- navigation.instant
10+
- navigation.tracking
11+
- navigation.top
12+
- search.suggest
13+
- search.highlight
14+
- search.share
915
palette:
1016
scheme: default
1117
primary: blue

0 commit comments

Comments
 (0)