A collection of thoughts about HTML, CSS, JavaScript, UX, a11y, web standards, and related things. Posts by Cory LaViska.
Design Systems Are An Investment
It's hard to put a value on a design system. It's a lot easier to add up the costs of said design system, especially in terms of salaries and development time. It's even easier to target a design system as the thing that's holding up a product from getting delivered.
How to File a Bug Report
They say there's no such thing as bug-free code. When problems arise, creating a minimal reproduction will give you the best chance of a speedy resolution.
Thoughts on Framework Churn
I often worry about framework churn. A lot. But using a framework isn't a bad thing. After all, they save time. They help you build things faster.
Better Buttons with color-mix() and Custom Properties
Let's build a button that accepts one color and calculates its hover and focus states automatically. For this experiment, we'll use CSS Custom Properties, color-mix(), and OKLCH to ensure that tints and shades are perceptually uniform.
Dynamic Slots
Web Component authors already know how powerful slots are, but what if you could do even more with them? Here's an interesting technique to use (or abuse) slots in your custom elements. I've been calling the pattern dynamic slots.
Converting a URL Object to a Plain Object in JavaScript
I needed to convert a URL
object to a plain object yesterday. You might have used it before. It's pretty handy for working with URLs!
Shoelace 2.0
It's been three years since I broke ground on Shoelace 2.0. Between then and now, the project has amassed over 300 million monthly hits on jsDelivr and, as of today, it is jsDelivr's 73rd most popular project.
Installing Shoelace in a React App
Although Shoelace is a web component library, it ships React wrappers that lets you use the library idiomatically in React. This video shows you how to install Shoelace in a brand new Create React App.
Why You Should Prefix Custom Events
Similar to how every custom element must contain a dash, I like to pretend that every custom event must also contain a dash. This removes all ambiguity between native events and custom events.
Custom Event Names and the Bubbling Problem
The topic of custom element event names comes up every now and then, especially from Shoelace users who get confused when events of the same name are emitted from different components.
Feeds available in Atom & JSON
Explore the archive for additional posts or press / to search.