Ancestors

Toot

Written by Profoundly Nerdy on 2025-01-28 at 16:55

Are there programming language syntax highlighters in pure CSS with no reliance on JS?

[#]programming #webdeveloment #css

=> More informations about this toot | More toots from profoundlynerdy@bitbang.social

Descendants

Written by R.L. Dane :Debian: :OpenBSD: 🍵 on 2025-01-28 at 17:02

@profoundlynerdy

I think @amin would know

=> More informations about this toot | More toots from rl_dane@polymaths.social

Written by CJ on 2025-01-28 at 17:39

@rl_dane @profoundlynerdy @amin This came up for me in a search.

=> More informations about this toot | More toots from roguefoam@polymaths.social

Written by Profoundly Nerdy on 2025-01-28 at 17:51

@roguefoam @rl_dane @amin Yep, that was just about the only useful link I was able to find in my own search.

=> More informations about this toot | More toots from profoundlynerdy@bitbang.social

Written by Anselm Schüler on 2025-01-28 at 17:03

@profoundlynerdy that sounds difficult

=> More informations about this toot | More toots from anselmschueler@ieji.de

Written by Roma Komarov on 2025-01-28 at 20:52

@profoundlynerdy The only real way to do so is with something like this: https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/ — using a color font and all the logic you can incorporate into it for this.

Otherwise, CSS does not provide any tools that will help with this (unless we're talking about still using JS or another language to statically highlight some code and output the result as HTML&CSS — there are plenty of solutions for that).

=> More informations about this toot | More toots from kizu@front-end.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113907030181411099
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
287.009328 milliseconds
Gemini-to-HTML Time
0.986207 milliseconds

This content has been proxied by September (3851b).