Mesh Gradients

By Chris Coyier on

CSS has linear, radial, and conic gradients, that can all do interesting and complex things… but not quite this, at least not on their own: That’s what we’ve been calling a Mesh Gradient. There are all sorts of ways to pull it off, like using multiple backgrounds with radial gradients placed at different locations, or […]

Primitive Obsession

By Chris Coyier on

I found this essay Primitive Obsession by Andrew Cairns interesting. The big example in it is this: Here the User function takes two string params, string being a primitive type, and here, quite easy to screw up by passing them in the wrong order and/or not pre-validating the values. If you agree, there are a […]

New JavaScript Set methods

By Chris Coyier on

Sets in JavaScript are quite useful as they are like an array, but can only contain one of a specific item. So you can unique-ify an array easily, and even willy-nilly add stuff to it and not worry about duplicates: Now they are even more useful with recently universally available methods, as Brian Smith summarizes:

Make Sure You Can Switch

By Chris Coyier on

Nicholas C. Zakas on the idea that we have choice in server-side JavaScript runtimes now, and you should be careful. … it makes sense to preserve the ability to switch runtimes easily. It doesn’t matter if you want to use Node.js or Deno or Bun in production right now. What you really want is the ability […]

Lazygit

By Chris Coyier on

I’ve long been a GUI guy for using Git (🔗). It just makes sense to me to clearly visually see an manipulate the files I’m staging and committing, seeing nice lists of current branches and PRs at a glance, and seeing the diffs and conflicts in a dedicated UI. But I get it, a lot […]