3 ms·
> The current JS requirement is a drag HTML could be so much more useful and time-saving if more functionality could be built without JavaScript. Thanks to CS
by DaiPlusPlus 6y ago
> The current JS requirement is a drag
HTML could be so much more useful and time-saving if more functionality could be built without JavaScript.
Thanks to CSS tricks, such as using the `:checked` pseudo-class in invisible form elements (toggled with a visible `<label for="">` I can implement neat show/hide effects in websites without any script - my current server-side-rendered project has a reusable "tab control" that doesn't use any client-script at all. It's great because it will always just-work, even if the user has weird privacy/script settings.
I can distill what I want down to two simple things: I want more CSS pseudo-classes based on the live DOM state (and the ability to add arbitrary wrapper boxes around or inside any element) and more native HTML elements that can mutate the DOM without requiring any scripts.
- ZephyrBlu 6y agoIt works, but that feels like you're hijacking HTML/CSS for an unintended use case.
- DaiPlusPlus 6y agoThe web today: as a platform for user interfaces and general-purpose content display, is far, far removed from HTML's "intended use case" as a means of sharing simple documents. Like it or not, but HTML+CSS is being used for all kinds of UI - and right now you absolutely need JS to support state-transitions in HTML, even if those states arguably shouldn't need any script because the same logic can be expressed without using a Turing-complete programming language.
- ksec 6y ago>HTML could be so much more useful and time-saving if more functionality could be built without JavaScript. I wish there is a movement for this. But unfortunately the Web Standard today is pretty much dedicated by Google. ( Although Apple and Mozilla still has some leverage )