Urgent.News

What's breaking now, across thousands of outlets.

Tech

La mejor arquitectura CSS comienza al decidir qué no debe hacer CSS jamás

También disponible en Inglés El problema Un sistema de tokens de diseño comienza limpio. Colores, espaciado, escala tipográfica; todos valores, todos legítimos. Luego, alguien necesita una forma rápida de rastrear si un modal está abierto, y una propiedad personalizada está justo ahí, sintácticamente idéntica a cada token a su alrededor. Se usa. Nadie se detiene a preguntar si debería haberse…

Perfekt CSS begins with an explicit decision about what CSS must never do. The foundation of a design token system starts clean, with colors, spacing, and typography values all equally legitimate. Eventually, someone needs a quick way to track whether a modal is open, and a custom property is there, syntactically identical to the tokens around it.

It's used. Nobody pauses to ask if it should have been used. A stylesheet begins as purely presentational. Then a selector appears, only applying when a user is logged in; a decision that CSS doesn't need to make, coded into CSS nonetheless because that was the path of least resistance at the time. Neither option looks wrong when chosen.

The pattern in both cases is the same: nothing in the system has arguments to say no. Why the problem exists Conversations about architecture almost always begin with the same question: what should this system do. It's a natural, generative question, but there's no natural stopping point. Every capability someone can imagine is a candidate for inclusion, and rarely is there an obvious moment to say no categorically, regardless of how convenient it may be right now.

The result are systems that accumulate default permissions. Restriction only shows up reactively, after something has gone wrong and someone has to write an autopsy explaining how a boolean ended up embedded in a design token. The first principle The absence of explicit exclusions eventually requires a system to do everything, because nothing within it has arguments to deny it.

It's worth stating clearly, because it flips the way most people think about design: exclusions are not the absence of architecture. They are their most resilient part. This principle mentioned earlier in this series: a boundary is a guarantee, not a limitation, taken a step deeper. Not just where CSS ends and JavaScript begins, but what CSS refuses to become while remaining entirely within its own domain.

Demonstrating the principle Identical syntax. Identical validity to the browser. One is a value. The other is application state, dressed as a token, because nothing in the platform distinguishes them and nothing in the system's design decided to make that distinction. The browser will never reject this. Rejection must come from a decision made in advance; not a limitation freely delivered by the platform.

Case study Quill's token layer contains values, and only values. Not because the platform mandates it, but because the system decided in advance not to allow anything that resembles state or logic there. The broader lesson The strongest systems, in both software development and beyond, are often defined by both what they declare they will not do and what they can do.

What this system should not do is a question more challenging than what it should do, precisely because it requires a decision made in advance, one that convenience will silently tempt to break later. That's the difference between a system that simply works today and one built to still make sense after the person who wrote it is no longer the one answering questions about it.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

🇧🇩 Introducing @olism/bd-geo — Bangladesh Geographic Data for JavaScript & TypeScript

🚀 I'm excited to share my new open-source npm package: @olism/bd-geo . @olism/bd-geo is a JavaScript/TypeScript package that provides structured geographical data for Bangladesh, including divisions…

  • @olism/bd-geo package provides Bangladesh geographic data for JS/TS developers
  • Includes divisions, districts, upazilas, areas, and villages dataset
  • Simplifies incorporation of geographic hierarchy in location-based apps

The Complete Guide to Password Manager Compliance: GDPR, HIPAA, and SOC 2 Explained

Introduction Password managers have become essential infrastructure for both individual users and enterprises managing hundreds of credentials.

  • GDPR compliance requires data minimization and right to data portability.
  • HIPAA mandates encryption, access controls, and a Business Associate Agreement.
  • SOC 2 Type II requires a six-month audit covering security, availability, and privacy.

The Complete Guide to GDPR-Compliant Cloud Backup Solutions

Introduction Data loss can devastate a business, but the fear of losing sensitive information shouldn't push organizations into accepting backup solutions with lax security practices.

  • GDPR mandates encryption, access controls, and backup system testing
  • Encryption in transit (TLS 1.2+) and at rest (AES-256) is essential
  • Data residency must remain within EU unless safeguards are in place

More from Tuesday 25 August →