Live data from Hacker News

How to write a JavaScript-free todo app using just HTML and CSS

mattzeunert.com

1–10 of 49 posts

Re: How to write a JavaScript-free todo app using just HTML and CSS

#3
These kinds of tricks are nice for progressive enhancement - you can have a navigation section in your server-side-rendered SPA that outputs a fully usable nav like this, and if a user has JS disabled, they'll still be able to navigate around your site, albeit with hard page reloads instead of more instant transitions. It's funny that people are using js frameworks to render js-free snippets that are then progressively enhanced with more js, but that's web development today.

Re: How to write a JavaScript-free todo app using just HTML and CSS

#6

These kinds of tricks are nice for progressive enhancement - you can have a navigation section in your server-side-rendered SPA that outputs a fully usable nav like this, and if a user has JS disabled, they'll still be able to navigate around your site, albeit with hard page reloads instead of more instant transitions. It's funny that people are using js frameworks to render js-free snippets that are then progressive…

[deleted]

Re: How to write a JavaScript-free todo app using just HTML and CSS

#7
post #2

So you can but... looking at the code... you don't want to.

Right, but I find these demos interesting nonetheless - in that they reveal capabilities of HTML + CSS that, as a casual frontend developer, you wouldn't normally think of them as having.

Re: How to write a JavaScript-free todo app using just HTML and CSS

#8
post #7
post #2

So you can but... looking at the code... you don't want to.

Right, but I find these demos interesting nonetheless - in that they reveal capabilities of HTML + CSS that, as a casual frontend developer, you wouldn't normally think of them as having.

I think this is the best way to look at projects like these.

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.

Re: How to write a JavaScript-free todo app using just HTML and CSS

#9
post #4

So what happens when I create my 51st todo?

The form stops working, deleting a todo also leaves it in use so you'll run out constantly, but it's like a pure css app bro - it's pretty sweet I think.

You could also make more than 50 in his js renderer file on github if you needed more

Post reply on HN