A Year of Transition

This post continues a series that began in 2007, the same year CSS-Tricks launched, and ran without interruption through 2021. 2022 brought a major shift: at the end of last year the site was setting goals for the months ahead, and instead it joined DigitalOcean. Readers stayed through that change, and that matters.

Thank you!

This is the final post of the year. Publishing resumes January 9.

Traffic: A Drop With a Cause

Google Analytics reports 64m pageviews for the year, against 88m last year — a 27% year-over-year decline. The explanation is publishing volume. Chris has always been a prolific writer, often posting several times a day, and his output was absent for most of 2022.

  • 2020: 1,183 articles
  • 2021: 890 articles
  • 2022: 390 articles

Seen against that, the pageview drop is milder than it first looks: the site published 43% fewer articles than in 2021 and 67% fewer than in 2020. The analytics figure also carries the usual caveat — it reflects Google Analytics alone. In past years the numbers were checked against Cloudflare, the CDN layer in front of the site, and Jetpack, which links the self-hosted WordPress install to WordPress.com’s hosted features. Those sources have never agreed with one another, so this time only Jetpack was consulted: it shows 59.9m pageviews, oddly higher than 2021’s 55m.

What Readers Read

Top ten articles published in 2022

  1. 6 Creative Ideas for CSS Link Hover Effects — Harshil Patel
  2. Explain the First 10 Lines of Twitter’s Source Code to Me — Anand Chowdhary
  3. What Were the Hottest Front-End Tools in 2021? — Louis Lazaris
  4. Replace JavaScript Dialogs With the New HTML Dialog Element — Mads Stoumann
  5. Say Hello to selectmenu, a Fully Style-able select Element — Patrick Brosset
  6. Reliably Send an HTTP Request as a User Leaves a Page — Alex MacArthur
  7. grid-template-columns — Mojtaba Seyedi
  8. A Complete Guide to CSS Cascade Layers — Miriam Suzanne
  9. CSS Database Queries? Sure We Can! — Chris Coyier
  10. CSS-Tricks is joining DigitalOcean! — Chris Coyier

Two entries stand out. The grid-template-columns piece comes from the Almanac, where Mojtaba spent the past year and a half working through all of the CSS Grid properties; the plan is to fold that material into the CSS Grid guide. The Cascade Layers guide was a collaboration with Miriam Suzanne, who is an editor on the spec itself.

Positions 11–20:

  1. Animation With Basic JavaScript — Md Shuvo
  2. Flutter For Front-End Web Developers — Obumuneme Nwabude
  3. CSS Grid and Custom Shapes, Part 1 — Temani Afif
  4. Write HTML, the HTML Way (Not the XHTML Way) — Jens Oliver Meiert
  5. A Whistle-Stop Tour of 4 New CSS Color Features — Chris Coyier
  6. Cool Hover Effects That Use Background Properties — Temani Afif
  7. Let’s Create a Tiny Programming Language — Md Shuvo
  8. Cool CSS Hover Effects That Use Background Clipping, Masks, and 3D — Temani Afif
  9. A Perfect Table of Contents With HTML + CSS — Nicholas C. Zakas
  10. CSS-Based Fingerprinting — Chris Coyier

Everything published in 2022 accounts for 4.8m pageviews, roughly 7.8% of the total. The perennially most-viewed article remains the Flexbox guide, at 5.8m views this year. The rough estimate: matching last year’s output with 540 more articles could have put the site near 67m pageviews.

Most-viewed articles overall

  1. A Complete Guide to Flexbox
  2. A Complete Guide to Grid
  3. Perfect Full Page Background Image
  4. The Shapes of CSS
  5. Media Queries for Standard Devices
  6. Using SVG
  7. How to Scale SVG
  8. CSS Triangle
  9. Gradient Borders in CSS
  10. Truncate String with Ellipsis
  11. How to use @font-face in CSS

The list is nearly identical to the previous several years. Gradient Borders in CSS is new to it, displacing the box-shadow property; below fourth place, the entries mostly just traded positions.

Most-referenced Almanac entries

  1. ::after / ::before
  2. transition
  3. box-shadow
  4. scrollbar
  5. justify-content
  6. flex-wrap
  7. gap
  8. overflow-wrap
  9. animation
  10. white-space

A lone pseudo-element sits at the top, with properties taking every other slot — notable given that newer relational selector functions like :has(), :is(), and :where() are now available.