Live data from Hacker News

Ask HN: Is it just me, or is CSS too damn hard?

news.ycombinator.com

71–80 of 358 posts

Re: Ask HN: Is it just me, or is CSS too damn hard?

#72
I suggest trying a CSS framework that handles most use cases for you. Just like we use frameworks with every other language, CSS/Sass/Less/JS frameworks can help here so you aren't constantly reinventing the wheel.

The ones you can customize with something like Sass or JS are my favorite when I don't want a basic template looking website. Tailwind, Foundation & Bootstrap are popular choices.

Re: Ask HN: Is it just me, or is CSS too damn hard?

#73
I am a designer turned developer. But long before entering development, I made websites with HTML and CSS from scratch.

I have no idea why people find CSS difficult. There is the odd case which even I find cumbersome, but for most of UI development, I find creating layouts with it very natural.

If you have specific questions, I can probably help.

Re: Ask HN: Is it just me, or is CSS too damn hard?

#74
The whole set of web technologies is a mess. We‘re still in the stone age of web UI design, similar to the 80‘s era of home computing when everybody built their own UI with basic drawing primitives. It’s going to take a while till decent, cross-platform/device UI libraries make progress and designers discover the value of reusable components that just work and are familiar to users.

Until then, we‘re stuck with terrible websites with, at most, one messy version full of ads for desktop computers, with much too small links/navigation elements for tablets (hi, HN!) and one clunky mobile version that looks horrible on most devices, particularly tablets.

Re: Ask HN: Is it just me, or is CSS too damn hard?

#75
post #73

I am a designer turned developer. But long before entering development, I made websites with HTML and CSS from scratch. I have no idea why people find CSS difficult. There is the odd case which even I find cumbersome, but for most of UI development, I find creating layouts with it very natural. If you have specific questions, I can probably help.

Same exact experience. I have a few theories as to why some struggle. One, I think of myself as having really great spatial awareness and reasoning abilities. I can think of a div in 2D space and imagine all of the forces acting on it to push it around. I’m a very visual person and tend to do well with stuff like this. Contrast this to complicated recursive algorithms and I can’t do it without actually drawing it with shapes and physical things. So I think of this as the proverbial right brained or left brained... some are able to visualize things better in their mind and I think those people tend to grok css better.

Two, I think all of the modern tooling and libraries have stunted folks abilities to learn the fundamentals. There’s also been a paradigm shift in that, at one point, there was a much more distinctive line in the sand between frontend and backend where it was more typical to build a website that was either static or used a CMS and you spent 90% of your time living in HTML/CSS... so you could master it better. Nowadays if you find the latest tutorial or join a boot camp or whathaveyou you’re gonna a be messing with components and css-in-js, express servers, graphql etc... so it’s a lot harder for a newb to hone that skill.

If you wanna know and be good at CSS you need to go back to basics and actually learn it. Text editor, style.css, index.html and a browser window.

Re: Ask HN: Is it just me, or is CSS too damn hard?

#76

The whole set of web technologies is a mess. We‘re still in the stone age of web UI design, similar to the 80‘s era of home computing when everybody built their own UI with basic drawing primitives. It’s going to take a while till decent, cross-platform/device UI libraries make progress and designers discover the value of reusable components that just work and are familiar to users. Until then, we‘re stuck with terri…

The sad thing is that by the 1990s we'd figured out how to do good UI design for desktops, but then we promptly forgot every single bit of that knowledge when the web came along.

Re: Ask HN: Is it just me, or is CSS too damn hard?

#77
I have a lot of aesthetic sense, and a strong eye for good layout and design. I still struggle every time I need to use CSS. I know enough to eventually make it do what I want with a lot of experimentation and googling, but not without a great deal of difficulty. I’ve known CSS whizzes who can make it do what they want easily, but they’re extremely rare.

I think it is just a really poorly designed framework. Other layout toolkits for native programming are typically far easier to learn and use.

Re: Ask HN: Is it just me, or is CSS too damn hard?

#78
CSS positioning woes are brutal- until you have the knowledge from previous struggles.

Full disclosure, I am artistic, but imo css is a different skillset.

You'll have knowledge on when to use flex, floats, or the new css grid, be able to center behind text, and all the other traditionally tricky things.

Honestly, just practice, don't give up!For layout specifically, Flexbox can solve almost any problem. Once I "got" flexbox I was having an easier time. And CSS-Grid can solve almost everything else!

Re: Ask HN: Is it just me, or is CSS too damn hard?

#80
How many hours have you spent writing CSS versus the programming languages you mention?

I don't think there's any art to writing CSS or having an easier time with it. It's just putting in the hours to know what works and the energy to understand the foundations (box model, cascading, etc. which are concepts you only need to commit to memory once).

Maybe CSS clicks better with some people, but the others can offset it with time. When I started writing CSS 15+ years ago I never thought I'd be able to do anything useful with JavaScript. But then you put in the hours…

Post reply on HN