File tree 4 files changed +34
-19
lines changed
src/pydata_sphinx_theme/assets/styles
4 files changed +34
-19
lines changed Original file line number Diff line number Diff line change 4
4
nav .page-toc {
5
5
// A little extra space before the buttons
6
6
margin-bottom : 1rem ;
7
- // Each successive nested item will be a bit smaller
8
- ul > li {
9
- font-size : 0.95em ;
10
- }
11
7
}
12
8
13
9
.bd-toc .nav ,
Original file line number Diff line number Diff line change 24
24
font-size : var (--pst-sidebar-font-size );
25
25
}
26
26
27
+ // override bootstrap when navlink are displayed in the sidebar
28
+ .nav-link {
29
+ font-size : var (--pst-sidebar-font-size-mobile );
30
+ }
31
+
27
32
& .no-sidebar {
28
33
border-right : 0 ;
29
34
}
@@ -213,11 +218,16 @@ nav.bd-links {
213
218
p .caption {
214
219
font-weight : var (--pst-sidebar-header-font-weight );
215
220
position : relative ;
216
- margin-top : 1.25 em ;
217
- margin-bottom : 0.5 em ;
221
+ margin-top : 1.25 rem ;
222
+ margin-bottom : 0.5 rem ;
218
223
color : var (--pst-color-text-base );
219
224
& :first-child {
220
225
margin-top : 0 ;
221
226
}
227
+
228
+ font-size : var (--pst-sidebar-font-size-mobile );
229
+ @include media-breakpoint-up ($breakpoint-sidebar-primary ) {
230
+ font-size : var (--pst-sidebar-font-size );
231
+ }
222
232
}
223
233
}
Original file line number Diff line number Diff line change 13
13
14
14
font-size : var (--pst-sidebar-font-size-mobile );
15
15
@include media-breakpoint-up ($breakpoint-sidebar-secondary ) {
16
- font-size : var (--pst-sidebar-secondary-font-size );
16
+ font-size : var (--pst-sidebar-font-size );
17
+ }
18
+
19
+ // override bootstrap settings
20
+ .nav-link {
21
+ font-size : var (--pst-sidebar-font-size-mobile );
22
+ @include media-breakpoint-up ($breakpoint-sidebar-secondary ) {
23
+ font-size : var (--pst-sidebar-font-size );
24
+ }
17
25
}
18
26
19
27
padding : 2rem 1rem 1rem 1rem ;
26
34
.onthispage {
27
35
color : var (--pst-color-text-base );
28
36
font-weight : var (--pst-sidebar-header-font-weight );
37
+ margin-bottom : 0.5rem ;
29
38
}
30
39
31
40
@include scrollbar-style ();
Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
// base font size - applied at body/html level
7
- --pst-font-size-base : 15 px ;
7
+ --pst-font-size-base : 1 rem ;
8
8
9
- // heading font sizes
10
- --pst-font-size-h1 : 36 px ;
11
- --pst-font-size-h2 : 32 px ;
12
- --pst-font-size-h3 : 26 px ;
13
- --pst-font-size-h4 : 21 px ;
14
- --pst-font-size-h5 : 18 px ;
15
- --pst-font-size-h6 : 16 px ;
9
+ // heading font sizes based on bootstrap sizing
10
+ --pst-font-size-h1 : 2.5 rem ;
11
+ --pst-font-size-h2 : 2 rem ;
12
+ --pst-font-size-h3 : 1.75 rem ;
13
+ --pst-font-size-h4 : 1.5 rem ;
14
+ --pst-font-size-h5 : 1.25 rem ;
15
+ --pst-font-size-h6 : 1.1 rem ;
16
16
17
17
// smaller than heading font sizes
18
- --pst-font-size-milli : 12 px ;
18
+ --pst-font-size-milli : 0.9 rem ;
19
19
20
20
// Sidebar styles
21
- --pst-sidebar-font-size : 0.9 em ;
22
- --pst-sidebar-font-size-mobile : 1.2 em ;
23
- --pst-sidebar-header-font-size : 1.2 em ;
21
+ --pst-sidebar-font-size : 0.9 rem ;
22
+ --pst-sidebar-font-size-mobile : 1.1 rem ;
23
+ --pst-sidebar-header-font-size : 1.2 rem ;
24
24
--pst-sidebar-header-font-weight : 600 ;
25
25
26
26
// Font weights
You can’t perform that action at this time.
0 commit comments