Syntax Highlighting in a Webpage Without JavaScript
21–30 of 44 posts
Re: Syntax Highlighting in a Webpage Without JavaScript
#22Earlier quoted context omitted.
There's a increasingly larger amount of web developers who are only "trained in React/Angular/Vue" and are unable to understand how to use or the trade-offs of regular websites using just HTML+CSS with only a little or no JS (that goes for both templated or fully static sites), and a surprising number of them even thinking they are some kind of "legacy technology". At the very least, this kind of article is informati…
I'm fascinated by this. It seems that for any developer with less than five years of industry experience there's a reasonable chance that they've almost exclusively worked in an SPA, JavaScript-for-everything environment. I have a hunch that there are a lot of web professionals out there these days who genuinely don't know how to build a web application without JavaScript - POST forms, cookies and the like.
The churn rate on junior developers is probably the single biggest factor in software over the past two decades.
Re: Syntax Highlighting in a Webpage Without JavaScript
#23Re: Syntax Highlighting in a Webpage Without JavaScript
#24Re: Syntax Highlighting in a Webpage Without JavaScript
#25So basically the script renders the JS-needed website, execute the JS as a build step and spit out the highlighted site. Pretty cool!
Re: Syntax Highlighting in a Webpage Without JavaScript
#26Re: Syntax Highlighting in a Webpage Without JavaScript
#27It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…
If you take this approach to the extreme, you should render to png on the server for display, and provide plain text for accessibility only.
Re: Syntax Highlighting in a Webpage Without JavaScript
#28Re: Syntax Highlighting in a Webpage Without JavaScript
#29It's funny to see us remembering that things can be done on the server. The trend to render everything client-side has always been troubling to me. Such a waste of resources (but it's not your resources, so developers don't care). Sure, things that are truly dynamic or are different for every user is probably usefully done on the client. But a static page with code samples can easily be rendered on the server, with s…
Give up, do some super hacky unmaintainable css mess, or suck it up and use js...
Re: Syntax Highlighting in a Webpage Without JavaScript
#30What is so special about this? This is the way websites have been doing syntax highlighting before people started using javascript libraries.
There's a increasingly larger amount of web developers who are only "trained in React/Angular/Vue" and are unable to understand how to use or the trade-offs of regular websites using just HTML+CSS with only a little or no JS (that goes for both templated or fully static sites), and a surprising number of them even thinking they are some kind of "legacy technology". At the very least, this kind of article is informati…
Then you'll end up having a project with highlighting logic in css and js. That's less than optimal