CSS sucks because we don't bother learning it (2022)
CSS complexity and evolution
- Many argue CSS is inherently complex and has grown into a huge, constantly evolving surface area (multiple layout models: flow, float, table, flex, grid, etc.), making “knowing CSS” in full no longer realistic.
- Others counter that while new features are added, almost everything old still works; you can be productive with a subset (e.g., box model + flexbox or grid).
- Several comments note historical baggage: browser wars, early hacks (centering, table layouts,
content-boxvsborder-box), and retrofitting new ideas for backward compatibility.
Declarative model, cascading, and “global state”
- Strong disagreement over mental models: some see CSS as “global mutable state” with class names acting like unscoped variables, causing brittleness and fear of collisions.
- Others insist that’s the wrong abstraction: CSS is a declarative rule system over a tree of boxes, more like a query/policy language than imperative code.
- Cascading and inheritance are described as both the core power and main source of confusion; debugging which selector “wins” is cognitively heavy.
- Newer features (
@layer,@scope, custom properties scoping, Shadow DOM, Web Components) are seen as attempts to add proper modularity on top of originally global design.
Frameworks, Tailwind, and LLMs
- Tailwind and utility-first approaches are characterized by some as a symptom of not learning CSS; others say they pragmatically solve naming, scoping, and ergonomics problems.
- Component libraries (Bootstrap, MUI) are praised for making layout easier but criticized as leaky abstractions that still require real CSS knowledge.
- Multiple comments note that LLMs tend to emit “div soup” and non-semantic HTML/CSS, reflecting the poor patterns prevalent in scraped code, though some developers now lean on AI to avoid hand-writing CSS.
Ergonomics, quirks, and hacks
- Numerous specific pain points are cited: percentage padding tied to width, inline vs inline-block behavior, units that don’t map cleanly to pixels or physical sizes, historical difficulty of vertical centering, odd pseudo-class/element syntax, browser defaults like
bodymargins, and recursive percentage sizing. - Some argue these are necessary or historically contingent tradeoffs; others say they show CSS is conceptually flawed or “irreparably broken,” even if powerful.
Learning CSS: feasibility and attitudes
- Several recommend deep resources (notably a 1,000+ page “definitive guide” and specialized courses), emphasizing that treating CSS as a serious part of the stack transforms the experience.
- Others report years of effort, reading books and specs, and still conclude “CSS sucks” due to sheer volume of rules and edge cases.
- A recurring meta-point: many backend or full‑stack developers never fully commit to learning CSS, then blame the language; critics respond that even with commitment, it’s unusually full of gotchas compared with many programming languages.