Home/Chris Coyier
Author

Chris Coyier

902 articles by Chris Coyier.

Frontend — A Look at Building with Astro

A Look at Building with Astro

Astro is a brand new framework for building websites. To me, the big thing is that it allows you to build a site like you're using a JavaScript framework (and

CCChris Coyier·July 7, 2021Frontend
Engineering — Body Toggle

Body Toggle

I appreciate the clarity of this trick that Mikael Ainalem posted over on Reddit:

CCChris Coyier·July 6, 2021Engineering
Frontend — The Fourteenth Fourth

The Fourteenth Fourth

It's CSS-Tricks birthday! Somehow that keeps coming around every year. It's that time where I reflect upon that past year. It's like the annual vibe check.

CCChris Coyier·July 4, 2021Frontend
Engineering — Zero-Width Space

Zero-Width Space

The name zero-width space is antithetical, but it's not without uses. In text, maybe you'd use it around slashes because you want to be sure the words are

CCChris Coyier·July 2, 2021Engineering
Performance — CSS for Web Vitals

CSS for Web Vitals

The marketing for Core Web Vitals (CWV) has been a massive success. I guess that's what happens when the world's dominant search engine tells people that

CCChris Coyier·July 1, 2021Performance
Languages — Fixing a Bug in Low-Resolution Mode

Fixing a Bug in Low-Resolution Mode

I was working on a bug ticket the other day where it was reported that an icon was sitting low in a button. Just not aligned like it should be. I had to go on

CCChris Coyier·June 30, 2021Languages
Frontend — Chromium spelling and grammar features

Chromium spelling and grammar features

Delan Azabani digs into the (hopefully) coming soon ::spelling-error and ::grammar-error pseudo selectors in CSS. Design control is always nice. Hey, if we

CCChris Coyier·June 29, 2021Frontend
Frontend — Custom Property Brain Twisters

Custom Property Brain Twisters

I am part of that 82% that got the answer to Lea Verou's quiz wrong. Stephen Shaw posted a similar quiz as well and it's a fun exercise sharpen your CSS chops.

CCChris Coyier·June 25, 2021Frontend
Frontend — "Weak declaration"

"Weak declaration"

PPK looks at aspect-ratio, a CSS property for layout that, for the most part, does exactly what you would think it does. It's getting more interesting as it's

CCChris Coyier·June 23, 2021Frontend
Frontend — inherit, initial, unset, revert

inherit, initial, unset, revert

There are four keywords that are valid values for any CSS property (see the title). Of those, day to day, I'd say I see the inherit used the most. Perhaps

CCChris Coyier·June 22, 2021Frontend
Languages — Some Typography Links V

Some Typography Links V

I studied the fonts of the top 1000 websites. Here's what I learned. — Michael Li brings the data. San-serif has total dominance. " it is rare to go below

CCChris Coyier·June 18, 2021Languages
Frontend — Inline Styles as Classes (lol)

Inline Styles as Classes (lol)

If you're abhorred by using inline styles, just move that style to the class attribute! And then make sure you have CSS in place that, ya know, does what it

CCChris Coyier·June 16, 2021Frontend
Frontend — Detect Unused Classes in... HTML

Detect Unused Classes in... HTML

Usually, when "unused" comes up in conversation regarding CSS, it's about removing chunks of CSS that are not used in your site or, at least, the styles not

CCChris Coyier·June 15, 2021Frontend
Engineering — target=blank

target=blank

Does that make your eye twitch a little bit? Like... it's a typo. It should be target="_blank" with an underscore to start the value. As in...

CCChris Coyier·June 9, 2021Engineering
Frontend — VS Code Extensions for HTML

VS Code Extensions for HTML

Let's look at some extensions for VS Code that make writing and editing HTML (and languages that are basically HTML with extra powers) better. You may not

CCChris Coyier·June 7, 2021Frontend
Performance — Can I :has()

Can I :has()

I just joked that we're basically getting everything we want in CSS super fast (mostly referring to container queries, my gosh, can you imagine they are

CCChris Coyier·June 4, 2021Performance
Engineering — Code blocks, but better

Code blocks, but better

Pedro Duarte made a wishlist for styled code blocks in blog posts and documentation, then hand-rolls a perfect solution for that wishlist. For example, a

CCChris Coyier·June 1, 2021Engineering
Engineering — Local: Always Getting Better

Local: Always Getting Better

I've been using Local for ages. Four years ago, I wrote about how I got all my WordPress sites running locally on it. I just wanted to give it another high

CCChris Coyier·May 31, 2021Engineering
Performance — Links on Performance III

Links on Performance III

Making GitHub’s new homepage fast and performant — Tobias Ahlin describes how the scrolling effects are done more performantly thanks to IntersectionObserver

CCChris Coyier·May 24, 2021Performance
Frontend — CSS Hell

CSS Hell

Collection of common CSS mistakes, and how to fix them

CCChris Coyier·May 21, 2021Frontend
Frontend — Learn CSS!

Learn CSS!

Ooo look at this mighty SEO flex from Google: Learn CSS! Well deserved — this is great content. Twenty-three chapters taking you through all the fundamentals

CCChris Coyier·May 20, 2021Frontend
Frontend — JSON in CSS

JSON in CSS

Jonathan Neal tweeted a heck of a little CSS trick the other day, putting JSON inside CSS and plucking it out with JavaScript. Valid values for custom

CCChris Coyier·May 20, 2021Frontend
Frontend — fit-content and fit-content()

fit-content and fit-content()

Here's some hardcore deep-dive CSS nerdery from PPK. If you can wrap your mind around min-content (the smallest an element can be based on the content it

CCChris Coyier·May 20, 2021Frontend
Career & Teams — Notion API

Notion API

The Public Beta of the Notion API dropped! Woot! Here's their guide. I've been a Notion user and fan for a long time, for both personal and professional team

CCChris Coyier·May 19, 2021Career & Teams
Engineering — Euismod

Euismod

An interactive tool for learning grid syntax from Etesam Ansari. In the Learn section, it teaches you some concepts (involving multiple bits of the grid

CCChris Coyier·May 17, 2021Engineering
Frontend — HTML Boilerplates

HTML Boilerplates

Manuel Matuzović goes line-by-line through a boilerplate HTML document. I like it. It's a good reference and has a lot of the same type of stuff I tend to put

CCChris Coyier·May 14, 2021Frontend