Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make heading-style use the font-weight-heading value #1213

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pydata_sphinx_theme/assets/styles/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ a {
.heading-style {
margin: 2.75rem 0 1.05rem;
font-family: var(--pst-font-family-heading);
font-weight: 400;
font-weight: var(--pst-font-weight-heading);
line-height: 1.15;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

p.prev-next-title {
color: var(--pst-color-primary);
font-weight: var(--pst-font-weight-heading);
font-weight: var(--pst-admonition-font-weight-heading);
font-size: 1.1em;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
color: var(--pst-color-text-base);
content: "Read The Docs";
font-family: var(--pst-font-family-base);
font-weight: var(--pst-font-weight-heading);
font-weight: var(--pst-admonition-font-weight-heading);
}
}
.fa.fa-caret-down {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ div.admonition,
> .admonition-title {
margin: 0 -0.6rem;
padding: 0.4rem 0.6rem 0.4rem 2rem;
font-weight: var(--pst-font-weight-heading);
font-weight: var(--pst-admonition-font-weight-heading);
position: relative;

&:after {
Expand Down Expand Up @@ -320,7 +320,7 @@ aside.sidebar {
padding-bottom: 0.5rem;
border-bottom: 1px solid var(--pst-color-border);
font-family: var(--pst-font-family-heading);
font-weight: var(--pst-font-weight-heading);
font-weight: var(--pst-admonition-font-weight-heading);
}

// Add margin to the first non-`.sidebar-title` item
Expand Down
5 changes: 4 additions & 1 deletion src/pydata_sphinx_theme/assets/styles/variables/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ html {
--pst-sidebar-header-font-size: 1.2rem;
--pst-sidebar-header-font-weight: 600;

// Admonition styles
--pst-admonition-font-weight-heading: 600;

// Font weights
--pst-font-weight-caption: 300;
--pst-font-weight-heading: 600;
--pst-font-weight-heading: 400;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you be consistent in the naming structure? So either "heading-font-weight" or "font-weight-heading". Here they are mixed...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I just chose to be consistent with --pst-sidebar-header-font-weight instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah if this is a more general inconsistency in our docs, then don't worry about it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an inconsistency in the code. Do you want me to revert the change?


// Font family
// These are adapted from https://systemfontstack.com/ */
Expand Down