Skip to content

Dark Mode Conflict in Pygments Fixed - #2111

Merged
matthiask merged 5 commits into
django-commons:mainfrom
andoriyaprashant:toolbarcss
Mar 31, 2025
Merged

Dark Mode Conflict in Pygments Fixed#2111
matthiask merged 5 commits into
django-commons:mainfrom
andoriyaprashant:toolbarcss

Conversation

@andoriyaprashant

Copy link
Copy Markdown
Member

Description

This PR further refines the dark mode styles for Pygments in Django Debug Toolbar. It addresses remaining conflicts by ensuring consistent syntax highlighting with better contrast and readability. This follows up on the previous PR to fully resolve the issue #2096

Fixes #2096

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

@tim-schilling

Copy link
Copy Markdown
Member

@andoriyaprashant thank you for working on this! Is there a way we can maintain the css variables in this solution? It looks like it's being changed to a series of fixed values that will be difficult to maintain. Not that the variables are super easy to maintain either 😅

@matthiask matthiask left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! As Tim said, the CSS variables should stay. They are used in the file and we cannot just remove them.

If you look further down in the file there's already a place where we define #djDebug .highlight colors for the base case, with a comment explaining how to regenerate this section. The dark mode colors should be added below this section I think.

@matthiask
matthiask merged commit 11e28f7 into django-commons:main Mar 31, 2025
@matthiask

Copy link
Copy Markdown
Member

Thank you!

@tim-schilling

Copy link
Copy Markdown
Member

Thank you @andoriyaprashant 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dark mode conflicts with pygments

3 participants