And here I am, trying for past 10 years to centre align a div, both horizontally and vertically.
CSS is powerful, you can do a lot of things without JS
191–200 of 319 posts
Re: CSS is powerful, you can do a lot of things without JS
#192I'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.
I'm reminded of the Jurassic Park quote when I see people doing "neat" complicated CSS hacks to do stuff a line of JS would do... "Yeah, yeah, but your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should."
Re: CSS is powerful, you can do a lot of things without JS
#193Earlier quoted context omitted.
Hmmm... .accordion .content { padding:0 10px; overflow:hidden; border:1px solid #fff; -webkit-transition: all .5s ease-out; -moz-transition: all .5s ease-out; } -webkit-transition, -moz-transition... it's like we're at 180 degrees to where the web was in the days of IE4-6
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.
Re: CSS is powerful, you can do a lot of things without JS
#194I'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.
I'm interested in seeing these 3 lines of Javascript that can implement an accordion. With a sane limit to number of characters on each line as well.
All an accordion does is add an event listener that removes a class from all elements and adds it back to one of them. Then there's a 1 line transition for that class in css.
Re: CSS is powerful, you can do a lot of things without JS
#195I am missing one important argument in this discussion: CSS only design is an important piece of a future web with reduced security and privacy threads. The (interesting) model of allowing remote code execution per default was a beautiful, but naive vision. We have to make big advances in technology, politics and society to make this model work in a way that does not make internet users victims by default. We are not…
Browsers/webapps have only become this crazily successful because they allow seamless delivery of applications to run locally. I haven't seen anything to build "code-less" apps that can implement the complex features people want and isn't a complete nightmare to build and maintain. Until then everything you're talking about is just a pipe dream. You can still make the apps you're talking about with html+css and enfor…
The reason is, that JS is enabled by default, nothing else.
If users had the possibility to actively decide before any remote code will execute on their computer, how many would like to enable it?
We are just one default checkbox setting away from what you call "utopia" here - a word that should be used for much bigger things.
Of utopic naivity in deed is the expectation that such powerful features will not be misused - delivering browsers with code execution enabled by default will be looked at as one of the most funny things of the first internet in a few decades.
Web application development paradigms that enforce JavaScript usage as an absolute necessity are examples of "naive utopian deadends". It is totally anti-avantgarde and anti-progressive, we should not waste so many young talents on that.
Re: CSS is powerful, you can do a lot of things without JS
#196- It's not an accessible solution in most cases (no keyboard navigation)
- The CSS classes are very and overly complex to the point where it's not intuitive at all what they're doing (honestly the code being intuitive is more important to me than any minor performance benefits that may be seen here)
Re: CSS is powerful, you can do a lot of things without JS
#197Numerous 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.
It's funny to hear this argument. I constantly hear "well, we don't worry about non-js browsers, because they are such a small minority". Yet how many people are keyboard-only users? I'm not saying your wrong, or that you are arguing against non-js browsers, just a funny twist.
Blind users can't opt to see.
Re: CSS is powerful, you can do a lot of things without JS
#198Earlier quoted context omitted.
Browsers/webapps have only become this crazily successful because they allow seamless delivery of applications to run locally. I haven't seen anything to build "code-less" apps that can implement the complex features people want and isn't a complete nightmare to build and maintain. Until then everything you're talking about is just a pipe dream. You can still make the apps you're talking about with html+css and enfor…
> Browsers/webapps have only become this crazily successful because they allow seamless delivery of applications to run locally. I'm going to heavily disagree with you. There were plenty of sites that were successful without using heavy JS. Most webapps I see can run easily without JS, they just choose not to. Yes, there are exceptions, but they are exceptions. "The core features people want" aren't JS-pop-ups, and s…
Not quite: users want to achieve specific tasks as quickly and easily as possible. Certainly "work quickly" and "work on mobile" are two huge pillars of that for many (probably the majority of) tasks, but for many applications you have to make significant trade-offs in functionality under the constraints of a static site.
Anything built on the web is competing with something that already is or can be built natively. Native applications don't have to concern themselves with this sort of limitation on interactivity as a trade-off for latency, which is an advantage. On the other hand, the web has the (huge) advantages of open discoverability and no-install distribution. It makes sense for both platforms to be working to fill in their gaps while trying to minimize the trade-offs.
It's clear that slow startup due to big chunks of js (and media) on load has become a big problem, and people are working on that, perhaps without much to show for it yet, but it isn't obvious to me that ceding the territory of interactive applications back to native implementations would be the better way forward.
Re: CSS is powerful, you can do a lot of things without JS
#199Is it wrong of me to not like using the css content property? I feel like actual content shouldn't be in css.
Re: CSS is powerful, you can do a lot of things without JS
#200Earlier quoted context omitted.
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.