Skip to main content

Chris Coyier

Founder, writer, designer, spam-deleter, email personality

Article

A Color Picker for Product Images

Sounds kind of like a hard problem doesn't it? We often don't have product shots in thousands of colors, such that we can flip out the <img src="product-red.jpg" alt="red product"/> with <img src="product-blue.jpg" alt="blue product"/>. Nor do we typically have products in a vector format such that we can apply SVG fills to them and such.

There is a clever way to do it though, even when your product shots are bitmap graphic files, like JPG or PNG. … Read article

Link

Overflow And Data Loss In CSS

Article

CSS-Tricks Chronicle XXXVI

This is one of these little roundups of things going on with myself, this site, and the other sites that are part of the CSS-Tricks family.… Read article

Article

Web Development Merit Badges

A collection of front-end development achievements. How many can you collect?
Link

caniemail.com

Article

Where should “Subscribe to Podcast” link to?

For a while, iTunes was the big dog in podcasting, so if you linked "Subscribe to Podcast" to like:

https://podcasts.apple.com/podcast/id493890455

...that would make sense. It's a web URL anyway, so it will work for anyone and has information about the podcast, as well as a list of recent shows you can even listen to right there. For Apple folks, you might be redirected in-app (mobile) or it becomes one click away (desktop). But for folks on Android or Linux or … Read article

Article

Some HTML is “Optional”

There is a variety of HTML that you can just leave out of the source HTML and it's still valid markup.

Doesn't this look weird?

<p>Paragraph one.
</p><p>Paragraph two.
</p><p>Paragraph three.</p>

It does to me, but the closing tags are optional. The browser will detect it needs them and manifest correctly in the DOM anyway. … Read article

Link

Caniuse and MDN compatibility data collaboration

Article

“Off The Main Thread”

JavaScript is what they call "single-threaded." As Brian Barbour puts it:

This means it has one call stack and one memory heap.

We all feel a symptom of that regularly in the form of performance jank and non-interactivity on elements or entire sites. If we give JavaScript lots of jobs and it gets really busy doing them, then it's not doing other things, like, say, handling our event handlers quickly.

There has been an interesting point/counter-point combo recently along … Read article

Article

CSS Security Vulnerabilities

Don't read that headline and get worried. I don't think CSS is a particularly dangerous security concern and, for the most part, I don't think you need to worry about it.

But every once in a while, articles tend to circulate and get some attention as to the possibilities of what CSS can do that might surprise or worry you.

Here's a little roundup.… Read article

icon-link icon-logo-star icon-search icon-star