When To Create CSS Parts

Written on

I was recently asked a really good question on Twitter: when shouldn't an element be a CSS Part?

Valid Names for CSS Parts

Written on

CSS Shadow Parts, colloquially known as CSS Parts, are used to expose elements inside a web component's shadow root so they can be styled by consumers with CSS. But what are we allowed to call these parts? What characters comprise a valid CSS part name? To find out, I had to dive into the spec!

Complacency on the Front End

Written on

We live in a world where front end developers are fatigued from the framework wars. Most have settled into a niche — especially the React crowd — and they’re happy to not have to think outside that box. They are, by far, the hardest crowd to sell web components to.

A Web Components Primer

Written on

On the eve of February, I was inspired to tweet about web components. What started as a simple thought quickly turned into a series of tweets that folks seem to find useful. I've adapted the thread and I'm posting it here for prosperity.

Success Requires Luck

Written on

I've concluded that successful "makers" have one thing in common: luck.

Flash of Undefined Custom Elements (FOUCE)

Written on

Update (December 23, 2024): Check out my latest post on this topic: Revisiting FOUCE

Bulletproof Components

Written on

Somewhere buried in my dusty basement lives a signed copy of Dan Cederholm's classic book Bulletproof Web Design. I purchased it during my first trip to An Event Apart in 2007. This book meant a lot to me back then, and almost 15 years later, many of its concepts still hold true.

Empowering Design System Users

Written on

The question of whether or not component APIs should be locked down at the code level comes up quite a bit. For example, if a button spec only calls for primary, secondary, and tertiary variants, should we still expose parts and custom properties so users can make further customization as needed?

Exploring the EyeDropper API

Written on

The EyeDropper API has landed in Chrome and Edge 95! This is a simple promise-based API that lets you select a color from anywhere on the screen. Let's dive in and see how it works.

The Future of Frameworks

Written on

Love them or hate them, web components ("custom elements") are making a huge dent in the world of front-end development. As of today, close to 18% of page views in Chrome are registering web components. That's an insane amount of usage!