mirror of
https://github.com/alecthomas/chroma.git
synced 2025-11-25 22:32:32 +02:00
Currently when writing the css file comments before each class is
present.
```css
/* Background */ .bg { color: #cdd6f4; background-color: #1e1e2e;-moz-tab-size: 2; -o-tab-size: 2; tab-size: 2; }
/* PreWrapper */ .chroma { color: #cdd6f4; background-color: #1e1e2e;-moz-tab-size: 2; -o-tab-size: 2; tab-size: 2; }
/* Error */ .chroma .err { color: #f38ba8 }
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #45475a }
...
```
(Also why is there a .bg class, feels like that could collide)
This is probably a micro-optimization but felt like the comments didn't
serve any purpose except clarity and debug value.
Also skipped writing empty css classes.
Before and after writing css file for style "catppuccin-mocha"
```sh
> ls -l -B
.rw-r--r-- 4,934 jocke 25 Jul 01:51 with.css
.rw-r--r-- 3,337 jocke 25 Jul 01:50 without.css
```
I didn't wanna make any changes to the output without changes to the
options.
Maybe we could just remove the comments all together and skip this extra
logic.