Skip to content

Commit 157c9ab

Browse files
authored
Make heading-style use the font-weight-heading value (#1213)
* Make heading-style use the font-weight-heading value * Separate font-weight setting for content headers and admonitions * Flip var to be consistent with --pst-font-weight-heading instead
1 parent 9223e6c commit 157c9ab

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

src/pydata_sphinx_theme/assets/styles/base/_base.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ a {
8585
.heading-style {
8686
margin: 2.75rem 0 1.05rem;
8787
font-family: var(--pst-font-family-heading);
88-
font-weight: 400;
88+
font-weight: var(--pst-font-weight-heading);
8989
line-height: 1.15;
9090
}
9191

src/pydata_sphinx_theme/assets/styles/components/_prev-next.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
p.prev-next-title {
2626
color: var(--pst-color-primary);
27-
font-weight: var(--pst-font-weight-heading);
27+
font-weight: var(--pst-admonition-font-weight-heading);
2828
font-size: 1.1em;
2929
}
3030

src/pydata_sphinx_theme/assets/styles/components/_readthedocs-switcher.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
color: var(--pst-color-text-base);
2929
content: "Read The Docs";
3030
font-family: var(--pst-font-family-base);
31-
font-weight: var(--pst-font-weight-heading);
31+
font-weight: var(--pst-admonition-font-weight-heading);
3232
}
3333
}
3434
.fa.fa-caret-down {

src/pydata_sphinx_theme/assets/styles/content/_admonitions.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ div.admonition,
3636
> .admonition-title {
3737
margin: 0 -0.6rem;
3838
padding: 0.4rem 0.6rem 0.4rem 2rem;
39-
font-weight: var(--pst-font-weight-heading);
39+
font-weight: var(--pst-admonition-font-weight-heading);
4040
position: relative;
4141

4242
&:after {
@@ -320,7 +320,7 @@ aside.sidebar {
320320
padding-bottom: 0.5rem;
321321
border-bottom: 1px solid var(--pst-color-border);
322322
font-family: var(--pst-font-family-heading);
323-
font-weight: var(--pst-font-weight-heading);
323+
font-weight: var(--pst-admonition-font-weight-heading);
324324
}
325325

326326
// Add margin to the first non-`.sidebar-title` item

src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ html {
2323
--pst-sidebar-header-font-size: 1.2rem;
2424
--pst-sidebar-header-font-weight: 600;
2525

26+
// Admonition styles
27+
--pst-admonition-font-weight-heading: 600;
28+
2629
// Font weights
2730
--pst-font-weight-caption: 300;
28-
--pst-font-weight-heading: 600;
31+
--pst-font-weight-heading: 400;
2932

3033
// Font family
3134
// These are adapted from https://systemfontstack.com/ */

0 commit comments

Comments
 (0)