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

BUG - Add --pst-color-heading fallback #2082

Merged
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
11 changes: 7 additions & 4 deletions src/pydata_sphinx_theme/assets/styles/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,33 +72,36 @@ a {
line-height: 1.15;
}

// From 0.16.1, the preferred variable for headings is --pst-color-heading
// if you have --pst-heading-color, this variable will be used, otherwise the default
// --pst-color-heading will be used.
h1 {
@extend %heading-style;

margin-top: 0;
font-size: var(--pst-font-size-h1);
color: var(--pst-color-heading);
color: var(--pst-heading-color, --pst-color-heading);
}

h2 {
@extend %heading-style;

font-size: var(--pst-font-size-h2);
color: var(--pst-color-heading);
color: var(--pst-heading-color, --pst-color-heading);
}

h3 {
@extend %heading-style;

font-size: var(--pst-font-size-h3);
color: var(--pst-color-heading);
color: var(--pst-heading-color, --pst-color-heading);
}

h4 {
@extend %heading-style;

font-size: var(--pst-font-size-h4);
color: var(--pst-color-heading);
color: var(--pst-heading-color, --pst-color-heading);
}

h5 {
Expand Down
3 changes: 3 additions & 0 deletions src/pydata_sphinx_theme/assets/styles/variables/_color.scss
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ $pst-semantic-colors: (

// assign the "duplicate" colors (ones that just reference other variables)
& {
// From 0.16.1, the preferred variable for headings is --pst-color-heading
// if you have --pst-heading-color, this variable will be used, otherwise the default
// --pst-color-heading will be used
--pst-color-heading: var(--pst-color-text-base);
--pst-color-link: var(--pst-color-primary);
--pst-color-link-hover: var(--pst-color-secondary);
Expand Down
Loading