Glow is different: Instead of attempting to understand language internals, Glow focuses solely on aesthetics — and how your code looks. Glow is micr

Introducing Glow: Beautiful, pixel-perfect Markdown code blocks

submited by
Style Pass
2024-02-13 11:30:03

Glow is different: Instead of attempting to understand language internals, Glow focuses solely on aesthetics — and how your code looks.

Glow is microscale. Glow is orders of magnitude smaller than the mainstream alternatives. We're talking 5K instead of 5M. It's by far the smallest implementation available.

Be it Haskell, TypScript, or Zig. React, Vue or Svelte. Whatever Turing-free Markdown artifact is mixed with another tightly coupled language-of-the-year oddity. And they will all glow:

Contrast this to grammar-aware highlighters like Shiki, where it's a large programming effort to add a new language to the mix. For example, the golang.json grammar file has 2700 lines, and javascript.json is a whopping 6000-line configuration file.

If you look at the most recognizable brands on the internet, you'll notice that 80% of them are based on a single brand color. It is often coupled with a secondary color and a complementary accent color. This is exactly how Glow works. You can make the code blocks compatible with your brand just by adjusting a handful of CSS variables:

It's a no-brainer to create new themes, both light and dark, after which all languages will automatically adapt your brand colors. No missing color tokens, no surprises.

Leave a Comment