Live data from Hacker News

CSS is hard no matter how good you are at it

aha.io

1–10 of 83 posts

Re: CSS is hard no matter how good you are at it

#4

I always thought there should be some kind of visual effects database. I'm looking to do X with Y tool. here are all the things it could be called in other tools. and/or layman terms.

The problem this article is pointing out is that you could have that database and still struggle.

It is easy to make a database of effects that work in isolation, for that matter GPT-4 will do a great job writing CSS to make isolated visual effects.

It’s when you need to put those visual effects to work inside of a real application or web site that you find it doesn’t work or rather almost works because of very fine details in how HTML and CSS work. Often you find you can move something forcibly a few pixels this way or that way but what works for the personal web site will be a nightmare for a complicated application that has multiple parts that multiple people are working on because you’ll need more hacks to deal with the consequences of those hacks.

It is real, global, and comprehensive understanding we need, not just another cheat sheet.

Re: CSS is hard no matter how good you are at it

#5
It's always been a time sink for me. Besides using frameworks, does anyone have any suggestions on how to develop a css file without getting into the neverending hacks that require hacks to fix the hacks?

I have yet to see a long term css file that's not a birds nest of fixes.

Re: CSS is hard no matter how good you are at it

#6

It's always been a time sink for me. Besides using frameworks, does anyone have any suggestions on how to develop a css file without getting into the neverending hacks that require hacks to fix the hacks? I have yet to see a long term css file that's not a birds nest of fixes.

Tailwind * tries * to resolve this, but is probably just a different bird's nest.

Re: CSS is hard no matter how good you are at it

#8
For what it's worth, this is a relatively easy problem to solve with flexbox these days.

My advice for those who constantly complain about CSS: give it the respect you give things like programming languages or SQL. You're not just understanding a text file, you're understanding the way browsers interpret and render styles. You probably need an expert to "just do what you want to do", and if you don't have an expert available you'll need to make do. Just like anything other sufficiently complex development problem.

Re: CSS is hard no matter how good you are at it

#9
post #6

It's always been a time sink for me. Besides using frameworks, does anyone have any suggestions on how to develop a css file without getting into the neverending hacks that require hacks to fix the hacks? I have yet to see a long term css file that's not a birds nest of fixes.

Tailwind * tries * to resolve this, but is probably just a different bird's nest.

Frameworks are going from the frying pan to the fire.

There are numerous React frameworks that supply a "widget set" either of web page elements, UI controls or both that work out of the box.

If you (your client, your employer, ...) like the way these look out of the box they are a great way to build something quickly and not have to understand the underlying CSS.

If you are required to customize the look, however, or you want to combine components from various sources and have them look consistent you have to understand all the concepts of the frameworks, the frameworks the frameworks depend on and CSS.

Re: CSS is hard no matter how good you are at it

#10

For what it's worth, this is a relatively easy problem to solve with flexbox these days. My advice for those who constantly complain about CSS: give it the respect you give things like programming languages or SQL. You're not just understanding a text file, you're understanding the way browsers interpret and render styles. You probably need an expert to "just do what you want to do", and if you don't have an expert a…

Flexbox is way better than what there was before, I'll grant that. Grid too.
Post reply on HN