Illustration only Photo by Tim Simon on Unsplash
MicroLighter ships a 2kb client-side syntax highlighter built on the CSS Custom Highlights API
Why it matters — For engineers who embed code in static sites, MicroLighter offers a way to highlight syntax without DOM mutation or span injection, using the browser's native Highlight API. It keeps the bundle small by loading grammars on demand and moves extra UI features into a custom element. The trade-off is that the CSS ::highlight() pseudo-element does not support italics, bold, or font swapping, so styling is limited to color and background.