The five best design links, every weekday

Domain: bram.us

bram.us

Using :is() in complex selectors selects more than you might initially think

Because selector matching in browsers happens from right to left, you might end up with more matches than you expected when using :is().

bram.us

Sibling Scopes in CSS, thanks to :has()

Leverage CSS :has() to select all siblings between two element boundaries.

bram.us

A :nth-child(An+B [of S]?) polyfill thanks to CSS :has()

The :has() selector is way more than just a “parent selector”…

bram.us

Upgrading colors to HD on the web

Let’s take a look at how we can progressively enhance the color experience on the web, accessing color spaces such as display-p3.

bram.us

Dark Mode Toggles Should be a Browser Feature

When implementing Dark Mode and ways to toggle it, developers currently need to duplicate code and roll their own toggle implementation.

bram.us

The Future of CSS: CSS Toggles

CSS toggles are a mechanism for associating toggleable state with a DOM element.

bram.us

The CSS :has() selector is way more than a “Parent Selector”

Safari TP 137 just dropped with unflagged support for :has(). Often dubbed “the parent selector”, :has() is way more than that…

bram.us

CSS in 2022

With 2021 coming to an end, let’s take a look at which CSS language features we can expect to land in browsers in 2022.

bram.us

The Future of CSS: Cascade Layers (CSS @layer)

When authoring CSS we have to carefully think about source code order, selector specificity, and the use of !important.

bram.us

The Large, Small, and Dynamic Viewports

There are some changes being proposed regarding viewport units, finally solving that “100vh in Safari on iOS” issue.

bram.us

The Future of CSS: Scroll-Linked Animations with @scroll-timeline (Part 2)

Create (pure CSS) Scroll-Linked Animations with Element-based Offsets using @scroll-timeline from the “Scroll-linked Animations“ CSS Specification.

bram.us

Animating a CSS Gradient Border

Recently, Stephanie Eckles sent out a call to revive the use of CSS border-image. Not to use it with images but to create Gradient Borders in CSS.

bram.us

The future of CSS: Higher Level Custom Properties

Higher Level Custom Properties are Custom Properties that control multiple other CSS Properties.

bram.us

Native Aspect Ratio Boxes in CSS thanks to aspect-ratio

In “CSS Box Sizing Module Level 4” a new aspect-ratio CSS property is defined. Let’s take a look at how to use it.

bram.us

Container Queries are coming to Chromium!

Just announced on the Chromium mailing list is an “Intent to Prototype” Container Queries. Let's take a look at the proposed syntax.

bram.us

Truncating Multi-line Text with CSS

Firefox 68 will support -webkit-line-clamp (prefixed!), which allows one to trunacate multi-line text using CSS.

bram.us

Building Better Forms™ by not taking away affordances

Don't fiddle too much with your forms‘ layout. Even a small innocent piece of CSS could leave you with a poor #UX and degrade #A11Y.

bram.us

Aspect Ratios in CSS are a Hack

Exploring what the current techniques are to creating Aspect Ratios in CSS, and what the future will hopefully bring.