Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The site is built with a content creation tool which has used a lot of JS and CSS, but the CSS is atrocious in it's automated output so it's triggering the browser to have to interpret the mess of directives in every code block. The tool is generating HTML trash like (brackets replaced for comment to not parse):

    [span style="--0:#E1E4E8;--1:#24292E"] [/span]
...over and over, essentially giving style directives for every blank space in the code block. A less capable mobile CPU may well have issues rendering this site due to the presence of so much trash CSS inside it guts. $0.02 hth


The site uses Astro (https://astro.build/) and the code blocks are generated using Shiki (https://shiki.style/). As Shiki generates the HTML and CSS at build-time instead of requiring runtime JS like alternatives like Prism (https://prismjs.com/#basic-usage), it's actually quite performant. I think it's unlikely that a couple of hundred lines with some empty spans in is going to cause performance issues – imo it's more likely to come from some silly JS somewhere.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: