Live data from Hacker News

Is there too much CSS now?

css-tricks.com

71–80 of 125 posts

Re: Is there too much CSS now?

#71
post #26

Too much CSS, possibly. Too much cognitive load, definitely, I do think so. As a whole, modern CSS features feel unintuitive and often require a historical knowledge of the problems this new feature X was trying to solve, which means to me, it's laden with baggage. Some new CSS feature pages on MDN are absolutely gigantic in their explanations, and that means that there is a lot of 'talking' required to overcome its…

> Too much CSS, possibly. > Too much cognitive load, definitely, I do think so. That's a good way to put it. AFter reading those two statements, it started to occur to me that a well-organized concept can have breadth, but not tax one's cognitive facilities. I think of programming languages. They ALL started simple, but then accrete. Look at K&R's original C, then look at C2x. The cognitive load increases. Like you s…

When was the last time there was a major shift away from backwards compatibility in HTML/CSS? I don't think there has been... has there?

Yes; in the early 2000’s, the W3C created XHTML 2.0 [1], a strict XML-based re-implementation of HTML. Because it dropped backwards compatibility to HTML4, it created a lot of backlash that (eventually) resulted in the browser vendors forming their own standards organization (WHATWG) which lead to the creation of HTML5.

[1]: https://en.wikipedia.org/wiki/XHTML#XHTML_2.0

Re: Is there too much CSS now?

#72
post #62
post #56

I’m personally more annoyed at the SVG pollution in modern day frontends. I’m not saying I hate SVGs but why in the heck are we producing 10k like html files by incorporating SVG paths directly into the HTML? There should be a standardized browser protocol to be able to insert SVG via filename and pass it any styling references.

What's wrong with having the SVG embedded in the HTML? Someone who knows more about the inner workings of network technologies can correct me if I'm wrong, but I would have figured it's better to send a single large file than a bunch of smaller files.

Apparently HTTP2 makes multiple small files much less of a performance issue (or maybe even turns it into a performance gain, I haven't looked into it too closely)

Re: Is there too much CSS now?

#73
The web standards stack has become too large, period. Google has way too many people working on Chrome/Chromium. CSS is a relatively small part of the insane strategic complexity they have orchestrated.

By the way, it would interesting to know how many they are now. Has anyone done any stats via Git lately? It was 2000+ in 2015 or so, iirc.

Re: Is there too much CSS now?

#74
I have been away from css for many years but then the last month I was tasked with helping a junior developer understanding web dev.

It has been an amazing journey only to learn the language has evolved gracefully and with a delicacy I really like.

Working with alignment of layout and positioning is much easier. It's implemented nicely.

Another really great thing about css imo is that it has no competition or the same crazy amount of libraries as javascript.

I like where its going.

Re: Is there too much CSS now?

#75
Yes. Why?

I'm going on a stretch here and say that the html part of the interwebs is transitioning back to simpler and less dynamic hypertext documents with a lot less UI fluff. The strength of html are it's textual hypertext capabilities.

Also, with Webassembly I do not see the point of expanding the UI capabilities of html.

Re: Is there too much CSS now?

#76

Earlier quoted context omitted.

CSS is also interpreted. CSS is actually compiled. WebKit uses a Just In Time (JIT) compiler [1]; I suspect all modern web engines do something similar. [1]: https://webkit.org/blog/3271/webkit-css-selector-jit-compile...

By that argument JavaScript is also compiled, so this point is wrong no matter how you interpret it: if "interpreted" means source code is transmitted and then executed in whatever fashion, then both JS and CSS are interpreted, if "interpreted" means a specific execution model on the client machine, then they are both JIT compiled and neither are interpreted.

>By that argument JavaScript is also compiled, so this point is wrong no matter how you interpret it:

If JavaScript is not compiled how does hoisting work?

Re: Is there too much CSS now?

#77
post #70

Earlier quoted context omitted.

Do you find element placement to be a one and done solution in regards to using grid, flex or table? Or do each have their own use cases? I tend to default to flex for most things because I am very comfortable with it. I guess I find keeping all the css properties in my head for all the different placement solutions cumbersome, flex and especially grid have a huge amount of functionality and custom properties, and I…

flex everything, it behaves much smoother

Grid everything, it has everything flex has and mixing the two makes one want to rage quit.

Re: Is there too much CSS now?

#78

No, it's amazing what you can accomplish with CSS now! You used to have to listen for user events with Javascript (later jQuery, around 2006) to add/remove CSS classes. There was no :hover :focus etc. Today, CSS pseudo-classes cover just about every transition state you need when designing a web application. I appreciate the approach frameworks like Tailwind are taking to CSS. At first I found it awkward to include s…

[deleted]

Re: Is there too much CSS now?

#79
post #62
post #56

I’m personally more annoyed at the SVG pollution in modern day frontends. I’m not saying I hate SVGs but why in the heck are we producing 10k like html files by incorporating SVG paths directly into the HTML? There should be a standardized browser protocol to be able to insert SVG via filename and pass it any styling references.

What's wrong with having the SVG embedded in the HTML? Someone who knows more about the inner workings of network technologies can correct me if I'm wrong, but I would have figured it's better to send a single large file than a bunch of smaller files.

See example here: https://imgur.com/a/XMEkAu1 it's 28 lines total...1 button + 2 svg images, should total 6 lines of code tops! This is my frustration and this is what I call SVG pollution.

Re: Is there too much CSS now?

#80

No, it's amazing what you can accomplish with CSS now! You used to have to listen for user events with Javascript (later jQuery, around 2006) to add/remove CSS classes. There was no :hover :focus etc. Today, CSS pseudo-classes cover just about every transition state you need when designing a web application. I appreciate the approach frameworks like Tailwind are taking to CSS. At first I found it awkward to include s…

For anybody who's as confused as I was: :hover and :focus have been around since CSS2, which was released in 1998 ... but Internet Explorer only supported them on links for a long time, not on arbitrary elements, so that was where jQuery came in.

Ahh, I really really don't miss those days, and I'm rather happy to have reclaimed the giant chunk of memory that used to hold things like quirks mode and hasLayout.

Post reply on HN