Skip to content

Issue with Chroma's minifier and dark/light re the GitHub styleΒ #15161

Open

Description

@bep

Re. what we do in chromaCSSOverrides

Check if we cannot have an option upstream to disable the minifier.

One example would be the nx class (NameOther) that gets trimmed away for the github-dark style.

Activity

  1. self-assigned this
    on Aug 3, 2026
  2. added this to the v0.165.0 milestone on Aug 3, 2026
  3. bep commented on Aug 3, 2026

    @bep
    MemberAuthor

    Of course, this problems goes away if you always use a mode class and then do

    const toggleDarkMode = function (dark) {
    	if (dark) {
    		document.documentElement.classList.replace('light', 'dark');
    	} else {
    		document.documentElement.classList.replace('dark', 'light');
    	}
    };

    To do the swiitching ...

  4. bep commented on Aug 4, 2026

    @bep
    MemberAuthor

    There's an WithAllClasses option that should work ...

  5. bep commented on Aug 4, 2026

    @bep
    MemberAuthor

    OK, I have a workaround in a PR. My previous workaround work related to this hasn't exactly been stellar ... I'll keep this open to track the upstream PR in alecthomas/chroma#1336 -- if that gets merged we can replace our hack with WithAllClasses(true).

  6. modified the milestones: v0.165.0, v0.166.0 on Aug 15, 2026
  7. modified the milestones: v0.166.0, v0.167.0 on Sep 10, 2026
  8. modified the milestones: v0.167.0, v0.168.0 on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions