Skip to content

Conversation

@Revathyvenugopal162
Copy link
Contributor

@Revathyvenugopal162 Revathyvenugopal162 commented Mar 17, 2025

fix #643

light dark
Screenshot 2025-03-24 at 09 15 45 Screenshot 2025-03-24 at 09 16 37

update

code fontstyle to **Source Code Pro", monospace**

Screenshot 2025-03-24 at 09 11 30

@github-actions github-actions bot added the fix Pull requests related to resolving problems or errors label Mar 17, 2025
@Revathyvenugopal162 Revathyvenugopal162 marked this pull request as ready for review March 17, 2025 13:57
@Revathyvenugopal162 Revathyvenugopal162 requested a review from a team as a code owner March 17, 2025 13:57
@clatapie
Copy link
Contributor

Out of curiosity, I noticed a different color is used for in and for in dark mode but not in light mode. Also, range doesn't seem to be highlighted in dark mode but is highlighted in light one.
Is it common to have different highlights between dark and light modes?

Copy link
Member

@jorgepiloto jorgepiloto left a 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);
Copy link
Member

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

That would be great!

Copy link
Contributor Author

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

@Revathyvenugopal162
Copy link
Contributor Author

Revathyvenugopal162 commented Mar 24, 2025

Out of curiosity, I noticed a different color is used for in and for in dark mode but not in light mode. Also, range doesn't seem to be highlighted in dark mode but is highlighted in light one. Is it common to have different highlights between dark and light modes?

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.

@Revathyvenugopal162
Copy link
Contributor Author

Out of curiosity, I noticed a different color is used for in and for in dark mode but not in light mode. Also, range doesn't seem to be highlighted in dark mode but is highlighted in light one. Is it common to have different highlights between dark and light modes?

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-dark

Screenshot 2025-03-24 at 09 25 00

lightbulb

Screenshot 2025-03-24 at 09 25 41

monokai - we are using this

Screenshot 2025-03-24 at 09 26 05

@Revathyvenugopal162 Revathyvenugopal162 requested review from a team, MaxJPRey and jorgepiloto March 24, 2025 08:28
@Revathyvenugopal162 Revathyvenugopal162 linked an issue Mar 24, 2025 that may be closed by this pull request
Copy link
Member

@jorgepiloto jorgepiloto left a 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.

@Revathyvenugopal162 Revathyvenugopal162 merged commit 6974bcb into main Mar 24, 2025
23 checks passed
@Revathyvenugopal162 Revathyvenugopal162 deleted the fix/codecell-style branch March 24, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests related to resolving problems or errors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong font family in code blocks format issues on literalinclude

6 participants