RSSAmplifier

XML-RSS Feed for Anselm Hannemann’s Writings · Aug 6, 2026

Negotiating with CSS

0
Sign in to vote or save

Anselm Hannemann · Anselm Hannemann — anselm-hannemann.com

Me: "Center this div."
CSS: "No."
Me: "display: flex;"
CSS: "Still no."
Me: "justify-content: center;
align-items: center;"
CSS: "Interesting... but also no." 😭

At some point you stop writing CSS...
...and start negotiating with it.

I like the statement "negotiating with CSS" because that’s the idea behind the web. We negotiate with the browser, or, let’s say the user’s device.

CSS makes this more obvious, JavaScript less so. Developer abstractions like Frameworks, TypeScript and others are misleading here since they still have do this internally but give devs the assumption it may not be needed.

Hence, we’ve seen a massive neglection of this principle: Progressive enhancement, graceful degradation are not used anymore in many web services.

⠗⠎ Remy Sharp wrote a great piece on it this week as well.

If you understand how browsers work, how CSS methods work (box sizing, object model), calculate, centering items is not much easier, but you know how to achieve centering items in which situation. You negotiate your visual product goal with web technologies. No praying, no "div magic" needed.

  • ✅ Know your craft.
  • ✅ Inspect and test early, often, always.
  • ✅ Live progressive enhancement, stop building static software artifacts for the web. Your users will thank you!

Read the original on anselm-hannemann.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.