Lurker News
Hey HN,

I'm a seasoned backend developer and systems administrator, with over 10 years of full-time programming experience. I've worked with anything from Assembly, C, Rust all the way to Python, Erlang, Elixir, PHP, Haskell, Lisp, Clojure.
When it comes to frontend, I have used React, Vue.js, ReasonML, Clojurescript and Elm extensively, and I know my way around web technologies in general. However, ever since I first started programming, I was NEVER able to get the gist behind CSS. I can't center my divs properly. I can't say "hey, CSS, this is the parent div, and all child divs must obey its size". I can't do anything basic on CSS without turning for help.
Incidentally, but very likely related, I always failed to have any glimpse into how design works. I have no idea which colors "go" with which ones, and pretty much all fonts look like the same for me.
I'd like to know the experience from fellow programmers. Is CSS an "art" thing? Is it common for other developers to have issues with it, or is it just me? Is there any material out there that made CSS "click" for you?

Comments (340) 150 threads

Show all comments

Showing thread 131 of 150

sgentle#
Yes, CSS is a hot mess for a few reasons that all basically boil down to historical baggage.

CSS was designed for an era where the web was made of documents, probably closer to the environment of a modern ebook than a modern web app. In an ebook, you might want to set your fonts and spacings and so on, maybe even throw in a table or two, but the idea of "I want this box to appear exactly here"... well, you don't even know where here is! The paper size might be different, or the user might have custom fonts, or who knows what. The goal wasn't fine-grained control over visual design, but consistency across an organisation's published material.
Of course, "fine-grained control over visual design" is exactly what everyone wanted, even in the early days, so CSS grew in features and scope until today we have this decades-tall stratified monument to the art of pleasing everybody: a fully-featured typesetting, layout, visual design, animation and user interface language. But, however rich its top layers, the whole thing rests on a base of document publishing, and that can't be changed because You Can't Break The Web.
HTML has this problem also, which is why so many sites look like