Live data from Hacker News

Is there too much CSS now?

css-tricks.com

101–110 of 125 posts

Re: Is there too much CSS now?

#101
post #70

Earlier quoted context omitted.

flex everything, it behaves much smoother

I've struggled with children sizing in flex. Children take up more space depending on their content. If the content overflows, flex doesn't handle that well either. Grid seems to handle this better when you specify grid-template-column. Anybody know a good flex-specific solution?

Maybe this: https://drafts.csswg.org/css-rhythm/

The searchable keyword for that is "responsive".

Using length units related to viewport size on max-widht may help.

Re: Is there too much CSS now?

#102
post #82
post #21

No. It's finally getting to be reasonable. The hackarounds are being displaced in droves now. Ever since CSS grid became a thing, I dumpstered all of the 3rd party web framework stuff I had been using. Placing elements in the right parts of the viewport (across all target devices) has always been 95% of the reason I consumed 3rd party libraries.

> Ever since CSS grid became a thing, I find myself having to relearn Grid every time I try to use. It actually reminds me a lot of RegEx. Super powerful and helpful but nothing about it sticks in memory.

Me too. But nowadays you can define them with with something like a ascii table.

Also, check "massonary".

There are so many cool features in css being released today that soon that banner "Best viewed on Netscape 3 on 800*600 resolution" may be common in some niche design sites.

But more likely as "Best viewed on Google Canary xxx, on flip screen devices with 10 bit depth colorspace".

By the way, did you know there is a css spec for rounded screen devices?

Re: Is there too much CSS now?

#103
post #21

No. It's finally getting to be reasonable. The hackarounds are being displaced in droves now. Ever since CSS grid became a thing, I dumpstered all of the 3rd party web framework stuff I had been using. Placing elements in the right parts of the viewport (across all target devices) has always been 95% of the reason I consumed 3rd party libraries.

What's the best reference and tutorial for modern CSS grid compatible across the standard browsers?

The official spec is quite good.

See csswg

Re: Is there too much CSS now?

#104

CSS has become like a scripting language now. You can do things like nested CSS[0], keyframe animations[1], calc operations[2], etc It has become very JavaScript-like and this is why I always try to see if I can do something in CSS first before I resort to JS. [0] https://www.w3.org/TR/css-nesting-1/ [1] https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes [2] https://developer.mozilla.org/en-US/docs/Web/CSS/c…

I already want an add-on that allows me to disable certain CSS features just like I block JS by default. It's becoming a problem for sure.

In about:config you can enable or disable features individually.

Recently they added ":modal" that will make paywalls harder to bypass. Most sites haven't implement yet, but I've already disabled this "feature" on config.

Re: Is there too much CSS now?

#105
post #104

Earlier quoted context omitted.

I already want an add-on that allows me to disable certain CSS features just like I block JS by default. It's becoming a problem for sure.

In about:config you can enable or disable features individually. Recently they added ":modal" that will make paywalls harder to bypass. Most sites haven't implement yet, but I've already disabled this "feature" on config.

thanks for this! I've already got a huge list of changes I make in about:config on every install but it looks like it's time for an update

Re: Is there too much CSS now?

#107
post #79
post #62

Earlier quoted context omitted.

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.

It's 28 lines because it's formatted to have every attribute on a different line.

I'd put the tag and all its attributes on a line, the entirety of the path on a single line, and then with the closing tag it's reduced to 3 lines.

This is how I do embedded SVGs:

https://imgur.com/a/zVVEVps

Note your example also looks way worse because of line wrap

Re: Is there too much CSS now?

#108
Yep, that is why I hanged my boots for Web FE development, no way to master it without being a full job, long gone are the days when could do well sites end to end.

At least I can have fun with WebGL/WebGPU, even if they lag behind native 3D APIs.

Re: Is there too much CSS now?

#109

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…

>There was no :hover :focus etc. All those were in the spec in 2006 (ok not sure about focus pseudo selector but I think so, I mean first-line was supported focus must have been), unfortunately due to MS they were not completely implemented for every element they were specified so and thus the jQuery hacks you remember.

Thanks for the extra details here! I've largely forgotten everything except the intense feelings of frustration.

Re: Is there too much CSS now?

#110
post #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.

Ahh thank you, I had forgotten the exact details! I still remember the burning frustration like it was yesterday though, hah.

CSS/HTML were my gateway into the tech industry though, so I'm glad I pushed through it. In retrospect, I could see why most "real programmers" were happy to push this tedious work over to me.

Post reply on HN