I'm not trying to be rude or unappreciative, but it's kinda crazy to me that the website itself doesn't contain the demo of the thing? I see sample code to implement it on my own site, but the site itself doesn't seem to have any highlighting or I highlighted some text and didn't see anything unusual? Maybe it's just me, maybe I'm missing something here? I'd like to see an example of what a thing does before straight up installing the code on my website.
tomtheelder 13 hours ago [-]
The site linked to is a blog post about the app. The actual site is linked in there, and if you follow that link there are examples.
OP probably should have put an example in this post. That said they look like... syntax highlighted code.
what 13 hours ago [-]
The code snippets are highlighted, presumably using microlighter?
pcthrowaway 12 hours ago [-]
That's what I assumed, but when I pasted this JS snippet from the blog post into the playground (ctrl+f "playground", selects JS) on the project page (https://davatron5000.github.io/microlighter/)
The highlighting looks completely different. I assumed the top-level commenter was being mildly obtuse, but it looks like they were (perhaps incidentally) correct
xigoi 15 hours ago [-]
Really cool! It’s a shame that the CSS Highlight API only allows changing the color and not the font.
tabwidth 10 hours ago [-]
Replaced Shiki on a docs site, grammar pack was bigger than the rest of the JS. 2KB for color-only feels like a fair trade.
SoftTalker 15 hours ago [-]
For me, a little highlighting goes a long way. I don't like my code looking like a box of Crayola crayons. Throwing in multiple fonts doesn't sound helpful at all.
xigoi 4 hours ago [-]
I personally like having keywords and built-in identifiers in italic.
goodmythical 12 hours ago [-]
#section in italics because it contains a bug I've not yet fixed
crummy 14 hours ago [-]
Or even setting bold would be nice.
kevin_thibedeau 4 hours ago [-]
Bizarre that a style sheet mechanism can't do do something that is it's primary function.
xigoi 3 hours ago [-]
I’m guessing that due to the way highlights can cross element boundaries, it would be difficult to support any styles that could change the layout.
capitainenemo 14 hours ago [-]
yeah, although text-stroke and text-shadow probably work even better with fixed width code since it avoids changing line lengths.
13 hours ago [-]
relativeadv 8 hours ago [-]
good to see dave still out there doing his thing
Rendered at 09:40:34 GMT+0000 (Coordinated Universal Time) with Vercel.
OP probably should have put an example in this post. That said they look like... syntax highlighted code.