How to write a JavaScript-free todo app using just HTML and CSS
mattzeunert.com
mattzeunert.com
CSS-only for this sort if thing is totally contrived, but making it still proved to be a fun little exercise.
[0]: https://codepen.io/scryptonite/pen/oLGzdj
[1]: https://github.com/you-dont-need/You-Dont-Need-JavaScript
It's not an exercise in efficiency, or even attempting to prove that HTML + CSS is somehow better than a JS version. I think it's about getting as much as you can out of CSS and HTML. As a viewer, looking at these projects usually give me 2-3 tricks to add to my collection and is worth the read.
I honestly don't think I'll ever NEED to implement a CSS+HTML calculator sans JS, but it's nice to know that it's possible and it could be something I look at if I want to implement a piece of it for something similar.
How complex of a web app can you make without using javascript.
I was doing something similar the other day with toying around trying to come up with an HTML/CSS only game. I ended up with this: https://codepen.io/billnreed/full/boXrVr
I applaud the work in making something sans JS for the kicks of it, but if your going to do it, at least don't break HTML.
The phone you're reading this post on has nearly as many CPU cycles available to run code as the web server that generated the html. Why on earth would you not want to distribute the overall application load.
Maybe because I want my phone battery to last a long time, but I don't care how much electricity the web server uses. Maybe also because the JavaScript is probably proprietary software [0], which I don't want to run on my computer.
Uglified/minified HTML+CSS is almost as difficult to parse by humans as JS.
I'm all for free software and very supportive of the arguments, but the pro-HTML, anti-JS rhetoric never made a lot of sense to me, consistency-wise, at least in these days of CSS3.
2. The web server has much more efficient languages available meaning that it's probably far fewer total CPU cycles than rendering on the client.
3. The web server can also cache the results and only render it once for a thousand users, can't do that with client side rendering, so your using far more CPU cycles there.
4. The server knows when the content changes, it can even render the page ahead of time, the client can't.
I also think this is something Web people overlook. Our phones are _insanely_ powerful, yet almost all Web sites are slow-loading garbage: because of JavaScript.
That's not an app.
TL;DR: Use styled checkboxes in a form.
In the end, he made a TODO-Layout, not a TODO-App. Interesting experiment I suppose, if you are into frontend stuff
Yes, you can create certain interactions with CSS alone but doing so purely for the sake of not using JS is pointless and at worst harmful.
You could also make more than 50 in his js renderer file on github if you needed more