Okay, Color Spaces

By Chris Coyier on

Eric Portis did a bang up job explaining color spaces on the web. sRGB is, as Eric puts it “the web’s dominant, default color space”, but he doesn’t spend much time on that. Thanks to recent evolutions in web tech, we have access to a wider gamut of colors (P3) and more color spaces than […]

View transitions: Handling aspect ratio changes

By Chris Coyier on

Jake Archibald has some great examples of awkward gotchas with View Transitions. View Transitions are naturally great at tweening one state of a DOM element to the next, but you’ll see likely-unwanted ghosting if the element changes shape from one state to the next. You can either prevent it from changing shape by changing either […]

JSR

By Chris Coyier on

Deno is getting in on the package registry business with JSR (“JavaScript Registry”). The name should help people understand it’s not Deno-specific, but instead built to support the ever-growing number of JavaScript runtimes. There isn’t much public information (it’s waitlisted), but David Bushell was able to take it for a spin.

Real-World Usage of content-visibility

By Chris Coyier on

Jeremey Keith uses the little-used CSS property content-visibility to improve the performance on a fairly heavy page. It works a treat. I did a before-and-after check with pagespeed insights on the page for Out On The Ocean. The “style and layout” part of the main thread work went down considerably. Total blocking time went from more than 600 […]

Syntax Highlighting with no spans?!

By Chris Coyier on

When I think of showing off syntax highlighted code on the web, I think of code that takes in a string of code, finds relevant substrings (tokens) with elaborate RegExes, then wraps them in <span>s with classes to that color can be applied to those classes. This is quite literally how it works. The really […]

The EditContext API

By Chris Coyier on

I hadn’t heard of the EditContext API at all, but apparently it’s landed in Chrome already. Aaron Iker has a nice thread on it. Using a <textarea> or the contenteditable attribute on HTML elements offers a pretty limited text editing experience. Some fancy text editing components actually hide the original editable element, which is part […]

Scroll-Locked Dialogs

By Chris Coyier on

I just wrote about the <dialog> element, with some basic usage and things to watch for. It’s a great addition to the web platform. Here’s another interesting thing we can do, connecting it to another one of my favorite new things on the web platform: :has(). (You can see I’ve been pretty into it lately.) […]

The Linear Look

By Chris Coyier on

If there is any one web design style trend that is dominant right now, it’s The Linear Look, as Alex Trost shows off here.