
How to Create a Favicon That Changes Automatically
I found this Free Favicon Maker the other day. It’s a nice tool to make a favicon (true to its name), but unlike other favicon generators, this one lets you
2,268 articles from CSS-Tricks.

I found this Free Favicon Maker the other day. It’s a nice tool to make a favicon (true to its name), but unlike other favicon generators, this one lets you

Spoiler alert: There is no support for it yet. But it is defined in the Media Queries Level 5 spec that includes other recent, but more familiar user

In our wide world of building for the web, we have every opportunity to talk about tools. We lunge to fill every gap we find in our projects with a definitive

I've always enjoyed the CSS art people create, but I’ve never ventured into it much myself. I'm familiar with many of the tricks involved, but still find it

As websites are becoming more and more dynamic when it comes to design, there is sometimes a need to incorporate complex, animated elements. There are many

The Web Performance Calendar just started up again this year. The first two posts so far are about, well, performance! First up, Rick Viscomi writes about the

2020 brought another wave of logical property features to major browsers and I’ve thoroughly enjoyed my investment into logical, rather than

In 2020, I learned about the power of web development for organizations and nonprofits outside of tech. I learned that you can leverage your skills to affect

Comment threads can be deceptively simple to get right. In this article, we will learn how to design comment threads the right way.

I had a unique requirement the other day: to build a layout with full-bleed elements while one element stays stuck to the top. This ended up being rather

This is about a wildly specific combination of technologies — Eleventy, the static site generator, with pages with images on them that you ultimately want

Let’s take a look at how to combine the border-image property in CSS with animated SVGs that move around a border. In the process, we’ll cover how to

It's kind of neat that we can do input:invalid {} in CSS to style an input when it's in an invalid state. Yet, used exactly like that, the UX is pretty bad.

The Jamstack is a modern web development architecture based on client-side JavaScript, reusable APIs, and prebuilt Markup.

First, quickly: AWS Amplify has a new Admin UI. Amplify always had a CLI that helps you build projects by setting up stuff like auth, storage, and APIs.

You might know a few ways to create charts with pure CSS. Some of them are covered here on CSS-Tricks, and many others can be found on CodePen, but I haven’t

It's sounding more and more likely that we're actually going to get real container queries. Google is prototyping a syntax idea from David Baron and refined

Matthias Ott, comparing how painter Gerhard Richter paints (do stuff, step back, take a look) to what can be the website building process and what can wreck it:

I first blogged about responsive data tables in 2011. When responsive web design was first becoming a thing, there were little hurdles like data tables that

We made one! It's open source if you want to make it better or fix things.

Some HTML elements come with preset designs, like the inconveniently small squares of <input type="checkbox"> elements, the limited-color bars of

Rachel Andrew introducing the fact that masonry layout is going to be a thing in native CSS via CSS grid layout. The thing with masonry is that we can already

Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible

State machines are typically expressed on the web in JavaScript and often through the popular XState library. But the concept of a state machine is adaptable

We’ve mentioned before just how great the <details> and <summary> elements are. They’re great for quickly making accordions that are accessible to

AVIF, the file format based on the AV1 video codec, is the latest addition to the next-gen image formats. Early reports and comparisons show good results

Lessons learned from building a framework (Halfmoon) using CSS variables, and the future of customizability and user personalization on the web.

Some really refreshing technological comparison writing from Eric Bailey. Like, ya know, everything in life, we don't have to hate or love everything. Baby

A web font workflow is simple, right? Choose a few nice-looking web-ready fonts, get the HTML or CSS code snippet, plop it in the project, and check if they

Some baby bear thinking from Katie Sylor-Miller:

Here are the big categories of rendering websites:

I’m thoroughly convinced that SVG unlocks a whole entire world of building interfaces on the web. It might seem daunting to learn SVG at first, but you have a

I've compared SVG and Canvas before. If you're trying to decide between them, read that. I'd say the #1 difference between them is vector (SVG) versus raster

I like working with styled-components. They allow you write CSS in your JavaScript, keeping your CSS in very close proximity to your JavaScript for a single

The survey results from the State of CSS aren't out yet, but they made this landing page that randomly shows you what one person wrote to answer that

Creating page content that sticks to the viewport as you scroll, something like a jump-to-anchor menu or section headings, has never been easier. Throw a

I'm sure different people picture different things when they think about webrings, so let me clarify what I picture. I see an element on a website that:

Custom properties not only enable us to make our code more efficient, but allow us to work some real magic with CSS too. One area where they have huge

I think this might be my most popular tweet of all time, but I'm not sure how to verify that these days. I'll restate this neat little trick here because

Have you ever had the idea for a website or new app that involved showing news content? You don't have to create content yourself to have the right to build

Great tutorial from Alex Trost (based on some demos, like this one, from Andy Barefoot) showcasing how, while CSS grid has straight grid lines across and

This article focuses adding WebGL effects to <image> and <video> elements of an already “completed” web page. While there are a few helpful

GitHub Actions are like free computers.

When setting a parent element to display: flex, its child elements align left-to-right like this:

There's a small line in the changelog that is is big news for CSS:

Tracking changes is a quintessential copyediting feature for comparing versions of content. While we’re used to tracking changes in a word processing

It's no secret that CSS-Tricks is a WordPress site. And as such, we like to keep things WordPress-y, like enabling the block editor and creating some custom

Chris made a few notes about Core Web Vitals the other day, explaining why measuring these performance metrics are so gosh darn important:

Like how you can use the background-color property in CSS to declare a solid color background, you can use the background-image property not only to declare image files as backgrounds but gradients as well. Using CSS gradients is better for control and performance than using an actual image (of a gradient) file.

Red + Blue = Purple… right?

Admission: I've never worked on a website that was in anything other than English. I have worked on websites that were translated by other teams, but I didn't

A table of contents is a list of links that allows you to quickly jump to specific sections of content on the same page. It benefits long-form content because

Recently, I finished a sixty-day sprint where I posted hand-coded zombie themed CSS animation every day. I learned a lot, but it also took me back to film

Just a little post I wrote up over at The Events Calendar blog. The idea is that a set of blocks can be grouped together in WordPress, then registered in a

A great developer tool takes a painful task that would normally be a developer’s entire job, and makes it a pleasure to do. As a personal example, I’ve needed

I've been saying for years that a pretty good icon system is just dropping in icons with inline <svg> where you need them. This is simple to do, offers

A built-in commenting system is one of the reasons people reach for WordPress (and often stay there long-term). While I do think having a comment system is

In 2013, Jake Archibald introduced this cool trick of animating an SVG path to look like it’s drawing itself. It’s 2020 now, and the trick is still popular.

Earlier this year I wrote a bit about autogrowing textareas and inputs. The idea was to make a <textarea> more like a <div> so it expands in

For the millionth time: We need container queries in CSS! And guess what, it looks like we're heading in that direction.