Skip to main content

Design Tokens in CSS: The 20% That Carries the Whole Design System

· 41 min read
Pere Pages
Software Engineer
A tall shelving unit seen head-on. The bottom shelf holds a small number of large, labelled jars of pigment, each with one clear tag. The shelves above hold many smaller unlabelled bottles, and thin threads run from each small bottle down to one of the big labelled jars it was poured from.

I am building a design system, and the part I keep coming back to is not the components. It is the hundred or so named decisions underneath them. Design tokens are the twenty percent of a design system that decides whether the other eighty holds together, and the part of them you actually have to understand fits in one careful read.

Violating Single Responsibility Principle (SRP)

· 3 min read
Pere Pages
Software Engineer

This is the first of a series of posts about the most common mistakes in Frontend development. This is the most common mistake I see in React projects.

This post explains what the Single Responsibility Principle (SRP) is and why it's important for React components. It shows how putting too much code and too many tasks in one component can lead to messy, hard-to-maintain apps.

Inside the Cookie Jar, How Chrome Actually Handles Cookies (and Why It Matters for Developers)

· 12 min read
Pere Pages
Software Engineer

Cookies are tiny key–value blobs with rules. Chrome enforces those rules rigorously: where the cookie applies (domain/path), when it’s sent (request matching + SameSite), how it’s protected (Secure/HttpOnly), and how long it survives (expiry/eviction). This post walks through the full lifecycle, browser behavior, sharp edges, and production patterns—with TypeScript examples.

  • Use server-set, Secure; HttpOnly; SameSite=Lax cookies for auth.
  • Scope deliberately with domain and path; avoid accidental overlaps.
  • Understand SameSite (and partitioning) for cross-site flows.
  • Keep cookies small, few, and purposeful.

A Complete Guide to the Compound Component Pattern in React (With TypeScript Examples)

· 7 min read
Pere Pages
Software Engineer
Nested modular blocks snapping together around a shared glowing state core

The Compound Component Pattern has become a popular approach in React for building flexible, reusable components. You'll often see it in two flavors: separate exports (<SelectTrigger />) or dot notation (<Select.Trigger />). But like any pattern, it comes with significant trade-offs. Let's explore both sides.

Running Claude Code Without Global Node on macOS (Using mise)

· 3 min read
Pere Pages
Software Engineer
A laptop on a tidy desk running a command-line AI assistant while a version-manager toolbox swaps Node.js runtime blocks

A guide for macOS developers who want to use Claude CLI without installing Node.js globally. The post demonstrates how to set up a local Claude CLI installation using mise for Node version management, configure a shell function in .zshrc for easy access, and solve the common issue where Claude CLI loses the current working directory context. This approach keeps your global system clean while making Claude CLI available from any project directory.