Live data from Hacker News

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

news.ycombinator.com

111–120 of 358 posts

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

#111
post #76

Earlier quoted context omitted.

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.

In the mid-90‘s the web wasn’t that bad, people used normal buttons, unstyled links and basic tables. The downward spiral started when corporations came and wanted their “CI” styling, then designers came and wanted to be “creative” and turned web pages into minigames where you have to guess what color or text style denotes a link, what the icons mean and how to trick the infinitely-scrolling website into displaying t…

And now we've come full circle with reader modes that disable all that crap the designers add.

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

#112
You're experience is so common that there are sites like "https://css-tricks.com/". I feel the problem here is that when they were making the standards, they for whatever reason separated the content from the layout and styling. I think XAML is actually an incredible example of well implemented layout and styling. I can do the layout graphically, and I can adjust the layout intuitively using XAML for those things that can't be done graphically. I can dive further into it and apply styling also through XAML. From a developer experience perspective, XAML is what a developer is looking for. HTML+CSS has it's roots in authoring pages of content, not applications and it clearly shows. They've attempted to evolve both to become application development languages and they're just not meant for that. The WWW really needs something akin to XAML+C#, maybe in this case a hybrid layout/styling language combined with TypeScript (IMO). All languages have their merits and their shortcomings, but for a web application developer, thank your lucky stars that CSS Frameworks exist.

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

#114
post #79

These made CSS click for me: - https://flexboxfroggy.com/ - http://cssgridgarden.com/

That was fantastic. Attempts to teach programming through gamification tend to have issues, but the instant visual feedback and clear goals helped me understand CSS much better.

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

#115
FWIW my father struggled with CSS for countless years before retiring. The reasons were he never got his head around the DOM or the CSS box model and the fact that it all assumed you were using CSS to style a document (or more specifically, a DOM tree). He would instead want to place this/that here/there, oblivious to the fact that he was building a web page that scrolls, rather than a more familiar VB app screen that does not.

Understanding the DOM, the CSS box model (and more recently, flexbox), and the above-mentioned nuance if you're coming from the app world, is more relevant than ever in our mobile-first time and age. Until you wrap your head around the notion that no, you're not styling an app screen that is fixed-sized, but are rather styling a document, you'll find CSS hard. (And yes, the real WTF is why are we using this type of tech to build UIs instead of native controls, but that's another debate.)

Once you do grok that, you also need to learn to accept some quirkiness and imperfection (it is a lousy language, after all, and browser engines don't render everything the same way), and you'll find that CSS is not that hard.

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

#116
post #107

> I have no idea which colors "go" with which ones, and pretty much all fonts look like the same for me. Can't help on the fonts thing here, but for colors, there are a couple of things to consider. You can use color wheels of different kinds to find matching colors and harmonious color palettes to create/use in a color scheme. There are many online sites that provide this for free. While deciding on colors, you shou…

I can relate to OP's lack of appreciation for fonts and color palettes - not 100%, but I get it. Color wheel tools are useful, and their results do look notably better to me, but using those may not improve your understanding of the color relationships much. But then, maybe you don't need to understand.

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

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

Thinking about the apps I used in the 1990s, we definitely had not figured out good UI design. There were some good ones, but there were some terrible ones too. Remember Napster's interface? Yikes.

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

#119
post #11

I actually prefer coding CSS from scratch. Color schemes and making things look nice IS hard, for my previous and current projects I had to get feedback from friends, family, end users, graphic designers, etc. UX is hard, it's a different field than programming, but there is a method, research, and science behind it. Here's a good resource for UX: https://goodui.org And here is one for color theory: https://uxplanet.…

I also really enjoy building CSS UIs from scratch, but editing existing stylesheets is a pain point. Band-aid after band-aid. I think keeping UI components tiny and coupling the stylesheets with the component is the best way I've seen (not necessarily styled components, just styles in the same folder as the component.) As the component is removed, its easy to nuke the stylesheet with surgically removing related style…

Why not styled components? It’s what immediately jumped to my mind while reading your comment, until you said otherwise :)

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

#120
post #94

I was in your boat about five or six years ago. Programming was fine, CSS was kinda-not-really ok, and design was just non-existent. Over time though, it really is something you can learn. I started by cloning designs in CSS that I liked. Same way I write programs just to learn. Pick a design and try to reproduce it. (Here's a good simple one that could probably be finished in a single sitting. [1]) Eventually I was…

I'll toss another design resource into the mix that I don't think gets mentioned enough: John McWade's "Before & After" magazine and videos. His focus isn't exclusively web but the principles he applies also apply to the Web. He does a fantastic job of training one to develop the eye of a designer. E.g. noticing certain patterns that aren't immediately apparent and then working with those to bring out a certain aesthetic.

I can't recommend him highly enough.

https://www.youtube.com/watch?v=gQ3NJGJY_F4

Post reply on HN