CSS is powerful, you can do a lot of things without JS
51–60 of 319 posts
Re: CSS is powerful, you can do a lot of things without JS
#52Earlier quoted context omitted.
JS is far more predictable than CSS.
CSS ( properly written ) is easier to debug than JS.
Re: CSS is powerful, you can do a lot of things without JS
#53Re: CSS is powerful, you can do a lot of things without JS
#54There was a time when separation of concerns and the "Rule of Least Power"[0] where the foundation principles of web development.
Today you have preprocessors, postprocessors, transpilers, content and style in JavaScript, behavior in CSS. Very powerful tools that can easily lead to unnecessary complexity.
On the other hand, somehow W3C failed to turn these principles into a truly interoperable and semantic web.
Ah! Also, nobody cares about unobtrusive JavaScript anymore.
Re: CSS is powerful, you can do a lot of things without JS
#55Re: CSS is powerful, you can do a lot of things without JS
#56Earlier quoted context omitted.
Fortunately you can use animation-delay to simulate bloated Javascript.
It's not about bloat, it's about accidentally triggering menus when you move your mouse down the page.
Re: CSS is powerful, you can do a lot of things without JS
#57Numerous accessibility issues here. Many of these examples can't be operated by a keyboard, for example. "CSS only" is not a virtue if it comes at the cost (as it always does) of needlessly excluding people from the web.
All of these are fairly simple show and hide interactions that are easier to use, build and maintain when done with javascript, with all the content shown if JS is turned off, not fully loaded or broken.
Re: CSS is powerful, you can do a lot of things without JS
#58Numerous accessibility issues here. Many of these examples can't be operated by a keyboard, for example. "CSS only" is not a virtue if it comes at the cost (as it always does) of needlessly excluding people from the web.