Live data from Hacker News

CSS is powerful, you can do a lot of things without JS

github.com

141–150 of 319 posts

Re: CSS is powerful, you can do a lot of things without JS

#141
post #122

I've worked with people who did things like this. It's not fun for anyone else on the team to try and figure out why you're using specific pseudo selectors on tags in a child inside a sibling in some label to make an accordion that would take 3 lines in Javascript.

Shouldn't pure CSS animations have better performance?

CSS animations are generally on par with JavaScript, except when they're hardware accelerated.

But that's changing once web animations (https://w3c.github.io/web-animations/) hits mainstream anyway - both CSS & JS get access to the same engine.

Re: CSS is powerful, you can do a lot of things without JS

#142
post #11

Earlier quoted context omitted.

Whenever someone makes a menu with js I don't use the site because I browse without js.

That's fine. Nobody forces you to use my applications and websites.

Until you work for a government agency. Or the only supplier of a certain important service in an area. Etc.

Re: CSS is powerful, you can do a lot of things without JS

#143

Most of these are just clever CSS hacks. There is a website collecting these kind of experiments since the early '00: http://www.cssplay.co.uk/ There 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 l…

> Ah! Also, nobody cares about unobtrusive JavaScript anymore.

I do. I also care about graceful degradation. There are certain times (e.g. Web Apps like Gmail) where graceful degradation is almost impossible and unobtrusive JavaScript would be silly but those are the exception. Most sites on the web are just content and there's no reason to have excessive JavaScript or any reason why the page can't be perfectly functional without it.

Re: CSS is powerful, you can do a lot of things without JS

#144
post #92

Earlier quoted context omitted.

Remember when Good Developers would hate on framesets because they break the back button and linking and everything? Now it's totally OK to break all that with AJAX and "text-as-apps"... I much prefer the days of the old web.

Days of the old web where flash was pervasive and best viewed in [IE6|Netscape|Mosaic|...] pages were everywhere. Every generation of the web has had really crappy devs building bad experiences. The current generation is not making anything worse than it's predecessor.

"best viewed in Chrome" is getting annoyingly common.

Re: CSS is powerful, you can do a lot of things without JS

#145
post #43
post #26

History is going to look back at CSS in disbelief when it calculates the amount of engineering time was spent trying to position elements correctly. This isn't hating on CSS as much as how broken layout creation is with no end in sight--but plenty of hacks.

CSS layout is actually pretty good these days, with flexbox anyway. It's hard to come up with a better layout system used anywhere near as much as CSS.

Agreed, however there are a ton of companies with extremely outdated os/browser policies, that refuse to update for whatever reason. Been a contract developer for ~10 years and even this year we were told to support IE 8 on a specific project because some fortune 50 company needs us to (Seriously). There were plenty of modern tools that helped reduce issues but there was still a bit of headache.

Re: CSS is powerful, you can do a lot of things without JS

#148
post #92

Earlier quoted context omitted.

Remember when Good Developers would hate on framesets because they break the back button and linking and everything? Now it's totally OK to break all that with AJAX and "text-as-apps"... I much prefer the days of the old web.

Days of the old web where flash was pervasive and best viewed in [IE6|Netscape|Mosaic|...] pages were everywhere. Every generation of the web has had really crappy devs building bad experiences. The current generation is not making anything worse than it's predecessor.

My current-favorite problem with modern web development is mobile-specific redirection.

e.g. you click a link in your email and it takes you to "www.foo.com/somethingWithParametersAndImportantStuff", foo.com detects you're on a phone and redirects you to their mobile homepage at "m.foo.com", blowing away your URL or even better not supporting your particular URL's page in the mobile site... where... your mobile browser could've just rendered the original site, albeit pinched.

It comes to mind because I'm currently dealing with this as an issue with UPS.com. We're halfway to 2017, people! How can we be having these problems.... :-)

Re: CSS is powerful, you can do a lot of things without JS

#149

Earlier quoted context omitted.

Days of the old web where flash was pervasive and best viewed in [IE6|Netscape|Mosaic|...] pages were everywhere. Every generation of the web has had really crappy devs building bad experiences. The current generation is not making anything worse than it's predecessor.

"best viewed in Chrome" is getting annoyingly common.

Bank Of America recently told me it only supported Safari and Chrome on MacOS... But... supported Firefox on Windows. Whaaaa....

Re: CSS is powerful, you can do a lot of things without JS

#150

Earlier quoted context omitted.

Days of the old web where flash was pervasive and best viewed in [IE6|Netscape|Mosaic|...] pages were everywhere. Every generation of the web has had really crappy devs building bad experiences. The current generation is not making anything worse than it's predecessor.

My current-favorite problem with modern web development is mobile-specific redirection. e.g. you click a link in your email and it takes you to "www.foo.com/somethingWithParametersAndImportantStuff", foo.com detects you're on a phone and redirects you to their mobile homepage at "m.foo.com", blowing away your URL or even better not supporting your particular URL's page in the mobile site... where... your mobile brows…

Digression: 'clicking on a link' may become an obscure reference soon, like dialing a phone. How many young people ever use a mouse?
Post reply on HN