-
Notifications
You must be signed in to change notification settings - Fork 8
fix: update the style for highlight name function #652
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
Conversation
|
Out of curiosity, I noticed a different color is used for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ensure we use a dedicated monospace font-family for code blocks.
| */ | ||
|
|
||
| div.highlight .nf{ | ||
| font-family: var(--ast-body-family); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a dedicated monospace font for code. So far, our body font is "Open Sans, sans-serif". Any chance we can have an --ast-code-family?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah sure . adding the monospace to code
Great observation, @clatapie ! The primary reason for the changes is that we use different pigment systems for code blocks in dark and light themes, which naturally leads to variations in keyword (or function) highlighting and distinct color palettes for readability and contrast in each mode. The second issue could be that we applied the changes only to the light theme and not the dark one, which we can fix in our theme. I’ll check this before merging the PR. As for the pigments, we can find the most similar and reasonable ones for both light and dark themes. |
As an addition to this comment, below are the snippets in dark theme in 3 different pygments github-darklightbulbmonokai - we are using this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just left one suggestion for a docstring.
src/ansys_sphinx_theme/assets/styles/pydata-sphinx-theme-custom.scss
Outdated
Show resolved
Hide resolved
…m.scss Co-authored-by: Jorge Martínez <[email protected]>



fix #643
update
code fontstyle to
**Source Code Pro", monospace**