Skip to content

Use consistent line-height for light & dark theme #227

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

Merged
merged 2 commits into from
Apr 10, 2025
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions python_docs_theme/static/pydoctheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ tt, code, pre {
font-size: 96.5%;
}

pre {
line-height: 125%;
Copy link
Member

Choose a reason for hiding this comment

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

To keep the initial value for the theme, rather than the overridden one:

Suggested change
line-height: 125%;
line-height: 120%;

Copy link
Member Author

Choose a reason for hiding this comment

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

I have to check later if this will work or if we need a more specific selector since pygments_dark.css is included last and sets 125%

Copy link
Member Author

Choose a reason for hiding this comment

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

It was indeed the case. I went for div.body pre to increase the specificity and override pygments_dark.css

}

div.body tt,
div.body code {
border-radius: 3px;
Expand Down
Loading