Fancy Image Decorations: Single Element Magic

As the title says, we are going to decorate images! There’s a bunch of other articles out there that talk about this, but what we’re covering here is quite a bit different because it’s more of a challenge. The challenge? … Fancy Image Decorations: Single Element Magic originally … | Continue reading


@css-tricks.com | 2 years ago

Some Things I Took Away From An Event Apart 2022 in Denver

An Event Apart 2022 Denver wrapped up yesterday. And while I was unable to make it to all three days this time, I did catch yesterday’s action — and it was awesome. I’m not very social or outgoing, but … Some Things I Took Away From An Event Apart 2022 in Denver originally publis … | Continue reading


@css-tricks.com | 2 years ago

A Pure CSS Gallery Focus Effect with :not

Oftentimes in the past, I needed to figure out how to add styles to all elements inside the container but not the hovered one. Demo of the expected “fade-out” effect on siblings to let users “focus” on a particular element.… A Pure CSS Gallery Focus Effect with :not originally pu … | Continue reading


@css-tricks.com | 2 years ago

Early Days of Container Style Queries

We’re still in suuuuuper early days with container queries. Too early for broad browser support, but Chromium already supports it, Safari started supporting it in version 16, and Firefox is presumably not far behind. Most early days conversations … Early Days of Container Style Q … | Continue reading


@css-tricks.com | 2 years ago

Rendering External API Data in WordPress Blocks on the Front End

There’ve been some new tutorials popping here on CSS-Tricks for working with WordPress blocks. One of them is an introduction to WordPress block development and it’s a good place to learn what blocks are and to register them in WordPress … Rendering External API Data in WordPress … | Continue reading


@css-tricks.com | 2 years ago

Adding Fluid Typography Support to WordPress Block Themes

Fluid typography is a fancy way of “describing font properties, such as size or line height, that scale fluidly according to the size of the viewport”. It’s also known by other names, like responsive typography, flexible type, fluid type, … Adding Fluid Typography Support to Word … | Continue reading


@css-tricks.com | 2 years ago

How to Safely Share Your Email Address on a Website

Spammers are a huge deal nowadays. If you want to share your contact information without getting overwhelmed by spam email you need a solution. I run into this problem a few months ago. While I was researching how to solve … How to Safely Share Your Email Address on a Website ori … | Continue reading


@css-tricks.com | 2 years ago

Using Web Components With Next (or Any SSR Framework)

In my previous post we looked at Shoelace, which is a component library with a full suite of UX components that are beautiful, accessible, and — perhaps unexpectedly — built with Web Components. This means they can be used … Using Web Components With Next (or Any SSR Framework) o … | Continue reading


@css-tricks.com | 2 years ago

State of CSS 2022 Survey Now Open

The State of CSS survey recently opened up. Last year, the survey confirmed everyone’s assumptions that TailwindCSS is super popular and CSS variables are mainstream. It also codified what many of us want from CSS, from Container Queries to … State of CSS 2022 Survey Now Open ori … | Continue reading


@css-tricks.com | 2 years ago

Introducing Shoelace, a Framework-Independent Component-Based UX Library

This is a post about Shoelace, a component library by Cory LaViska, but with a twist. It defines all your standard UX components: tabs, modals, accordions, auto-completes, and much, much more. They look beautiful out of the … Introducing Shoelace, a Framework-Independent Componen … | Continue reading


@css-tricks.com | 2 years ago

Getting Started With WordPress Block Development

Let’s acknowledge that developing for WordPress is weird right now. Whether you’re new to WordPress or have worked with it for eons, the introduction of “Full-Site Editing” (FSE) features, including the Block Editor (WordPress 5.0) and the Site Editor (WordPress … Getting Started … | Continue reading


@css-tricks.com | 2 years ago

GIFs Without the .gif: The Most Performant Image and Video Options Right Now

So you want an auto-playing looping video without sound? In popular vernacular this is the very meaning of the word GIF. The word has stuck around but the image format itself is ancient and obsolete. Twitter, for example, has … GIFs Without the .gif: The Most Performant Image and … | Continue reading


@css-tricks.com | 2 years ago

Named Element IDs Can Be Referenced as JavaScript Globals

Did you know that DOM elements with IDs are accessible in JavaScript as global variables? It’s one of those things that’s been around, like, forever but I’m really digging into it for the first time. If this is the first … Named Element IDs Can Be Referenced as JavaScript Globals … | Continue reading


@css-tricks.com | 2 years ago

How to Create Wavy Shapes & Patterns in CSS

The wave is probably one of the most difficult shapes to make in CSS. We always try to approximate it with properties like border-radius and lots of magic numbers until we get something that feels kinda close. And that’s before … How to Create Wavy Shapes & Patterns in CSS origin … | Continue reading


@css-tricks.com | 2 years ago

How To Customize WordPress Block Theme Cover Templates with Dynamic Post Feature Images

If we browse the WordPress theme directory, a majority of themes showcase cover images. It is a feature in popular demand. The cover page trend is true even in the block theme directory screenshots as well. Let’s consider the … How To Customize WordPress Block Theme Cover Templat … | Continue reading


@css-tricks.com | 2 years ago

The Web is Good Now

The video of Chris Coyier’s talk at CascadiaJS 2022 is now available. It’s his first in-person talk in more than two years, so it’s great to see our good friend back on stage slinging gems on what makes the web … The Web is Good Now originally published on CSS-Tricks, which is pa … | Continue reading


@css-tricks.com | 2 years ago

How I Made an Icon System Out of CSS Custom Properties

SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover … How I Made an Icon System Out of CSS Custom Properties originally published on CSS-Tr … | Continue reading


@css-tricks.com | 2 years ago

CSS Rules vs. CSS Rulesets

The latest spec: A style rule is a qualified rule that associates a selector list with a list of property declarations and possibly a list of nested rules. They are also called rule sets in CSS2. Louis Lazaris: As the above quote from W3C indicates, it seems … CSS Rules vs. CSS … | Continue reading


@css-tricks.com | 2 years ago

CSS Checkerboard Background… But With Rounded Corners and Hover Styles

On one hand, creating simple checkered backgrounds with CSS is easy. On the other hand, though, unless we are one of the CSS-gradient-ninjas, we are kind of stuck with basic patterns. At least that’s what I thought while staring at … CSS Checkerboard Background… But With Rounded … | Continue reading


@css-tricks.com | 2 years ago

Making a Real-Time Clock With a Conic Gradient Face

Gradients have been a part of the CSS spectrum for quite some time now. We see a lot of radial and linear gradients in a lot of projects, but there is one type of gradient that seems to be a … Making a Real-Time Clock With a Conic Gradient Face originally published on CSS-Tricks, … | Continue reading


@css-tricks.com | 2 years ago

More Details on `details`

A lot of chatter around the ol’ and elements lately! I saw Lea Verou recently tweet an observation about the element’s display behavior and that sorta splintered into more observations and usage notes from folks, including a revived … More Details on `details` originally publis … | Continue reading


@css-tricks.com | 2 years ago

When is it OK to Disable Text Selection?

Using CSS, it’s possible to prevent users from selecting text within an element using user-select: none. Now, it’s understandable why doing so might be considered “controversial”. I mean, should we be disabling standard user behaviors? Generally speaking, no, we … When is it OK t … | Continue reading


@css-tricks.com | 2 years ago

WebKit Features in Safari 16.0

Whew boy, Safari 16 is officially out in the wild and it packs in a bunch of features, some new and exciting (Subgrid! Container Queries! Font Palettes!) and others we’ve been waiting on for better cross-browser support (Motion Path! Overscroll … WebKit Features in Safari 16.0 or … | Continue reading


@css-tricks.com | 2 years ago

The Basics of Remix

You’ve probably heard a lot of hype around one of the newest kids on the framework block, Remix. It may be surprising that it got its start back in 2019, but it was originally only available as a subscription-based premium … The Basics of Remix originally published on CSS-Tricks, … | Continue reading


@css-tricks.com | 2 years ago

Building Interactive Figma Widgets

Figma has always encouraged collaboration between developers and designers. It strives on an endless treasury of community-made plugins. Need 3D elements? There’s a plugin for that. Need abstract SVGs? There’s a plugin for that, too. That said, the design part of Figma has … Buil … | Continue reading


@css-tricks.com | 2 years ago

How I Made a Pure CSS Puzzle Game

I recently discovered the joy of creating CSS-only games. It’s always fascinating how HTML and CSS are capable of handling the logic of an entire online game, so I had to try it! Such games usually rely on the ol’ … How I Made a Pure CSS Puzzle Game originally published on CSS-Tr … | Continue reading


@css-tricks.com | 2 years ago

What’s New With Forms in 2022?

Browsers are constantly adding new HTML, JavaScript and CSS features. Here are some useful additions to working with forms that you might have missed… requestSubmit() Safari 16 will be the final browser to add support for requestSubmit. Before we … What’s New With Forms in 2022? … | Continue reading


@css-tricks.com | 2 years ago

Overlapping Bar Charts

As the name suggests, overlapping charts visualize two different sets of data in a single diagram. The idea is that the overlapping bars allow us to compare data, say, year-over-year. They are also useful for things like tracking progress for … Overlapping Bar Charts originally p … | Continue reading


@css-tricks.com | 2 years ago

Hacking CSS Animation State and Playback Time

CSS-only Wolfenstein is a little project that I made a few weeks ago. It was an experiment with CSS 3D transformations and animations. Inspired by the FPS demo and another Wolfenstein CodePen, I decided to build my own version. … Hacking CSS Animation State and Playback Time orig … | Continue reading


@css-tricks.com | 2 years ago

Flutter For Front-End Web Developers

I started as a front-end web developer and then became a Flutter developer. I think there were some concepts that helped me adopt Flutter easier. There were also some new concepts that were different. In this article, I want to … Flutter For Front-End Web Developers originally pu … | Continue reading


@css-tricks.com | 2 years ago

Behind the CSScenes, September 2022

Those of you who have been reading CSS-Tricks for a while may remember that we used to publish a little thing we called CSS-Tricks Chronicles. Our friend Chris Coyier would write up a reflection from the past couple of … Behind the CSScenes, September 2022 originally published on … | Continue reading


@css-tricks.com | 2 years ago

Comparing JAWS, NVDA, and VoiceOver

A screen reader is an important accessibility tool for people with no or limited vision. People who are blind or those with low vision can use a screen reader to navigate the computer. Screen readers will read contents on the … Comparing JAWS, NVDA, and VoiceOver originally publi … | Continue reading


@css-tricks.com | 2 years ago

iShadeed’s Container Queries Lab

Ahmad Shadeed got an early jump on container queries and has a growing collection of examples based on everyday patterns. And, if you missed it, his latest post on container queries does a wonderful job covering how they work since … iShadeed’s Container Queries Lab originally pu … | Continue reading


@css-tricks.com | 2 years ago

Interpolating Numeric CSS Variables

We can make variables in CSS pretty easily: :root { --scale: 1; } And we can declare them on any element: .thing { transform: scale(var(--scale)); } Even better for an example like this is applying the variable on a user … Interpolating Numeric CSS Variables originally publishe … | Continue reading


@css-tricks.com | 2 years ago

Using Grid Named Areas to Visualize (and Reference) Your Layout

Whenever we build simple or complex layouts using CSS Grid, we’re usually positioning items with line numbers. Grid layouts contain grid lines that are automatically indexed with positive and negative line numbers (that is unless we explicitly name them). … Using Grid Named Areas … | Continue reading


@css-tricks.com | 2 years ago

Not Sure How to WordPress Anymore?

Neither do I! And that’s probably because there’s a lot happening in WordPress-land. The evolution towards full-site editing (FSE) introduces frequent changes to the way we build themes and plugins, and at such break-neck speed that the documentation itself is … Not Sure How to W … | Continue reading


@css-tricks.com | 2 years ago

Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project

If a utility class only does one thing, chances are you don’t want it to be overridden by any styles coming from elsewhere. One approach is to use !important to be 100% certain the style will be applied, regardless of … Using CSS Cascade Layers to Manage Custom Styles in a Tailwi … | Continue reading


@css-tricks.com | 2 years ago

Removing jQuery from GOV.UK

The GOV.UK team recently published “How and why we removed jQuery from GOV.UK“. This was an insightful look at how an organization can assess its tooling and whether something is still the best tool for the job. This … Removing jQuery from GOV.UK originally published on CSS-Trick … | Continue reading


@css-tricks.com | 2 years ago

CSS Grid and Custom Shapes, Part 2

Alright, so the last time we checked in, we were using CSS Grid and combining them with CSS clip-path and mask techniques to create grids with fancy shapes. Here’s just one of the fantastic grids we made together: CodePen… CSS Grid and Custom Shapes, Part 2 originally published o … | Continue reading


@css-tricks.com | 2 years ago

When Do You Use CSS Columns?

That ain’t rhetorical: I’m really interested in finding great use cases for CSS multi-column layouts. The answer seems straightforward. Use columns when you want to split any content into columns, right? Here is generally the sort of example you’ll find … When Do You Use CSS Colu … | Continue reading


@css-tricks.com | 2 years ago

Why (and How) I Write Code With Pencil and Paper

If the thought of handwriting code seems silly, it might surprise you to know that it’s inevitable. If you’re unsure, think about the last job interview you did, and remember how there was no computer around in the interview room … Why (and How) I Write Code With Pencil and Paper … | Continue reading


@css-tricks.com | 2 years ago

CSS Grid and Custom Shapes, Part 1

In a previous article, I looked at CSS Grid’s ability to create complex layouts using its auto-placement powers. I took that one step further in another article that added a zooming hover effect to images in a grid layout… CSS Grid and Custom Shapes, Part 1 originally published o … | Continue reading


@css-tricks.com | 2 years ago

Quick Tip: Clear VS Code Cache for Open Files

If you use VS Code, you might have enabled the setting for re-opening a previously open file next time the app launches. I do. I like that. Hey, thanks for remembering, buddy! 🤗 But sometimes you really, really don’t want … Quick Tip: Clear VS Code Cache for Open Files or … | Continue reading


@css-tricks.com | 2 years ago

Designing for Long-Form Articles

Designing a beautiful “article” is wrought with tons of considerations. Unlike, say, a homepage, a long-form article is less about designing an interface than it is designing text in a way that creates a relaxed and comfortable reading experience. That’s … Designing for Long-Form … | Continue reading


@css-tricks.com | 2 years ago

Committing CSS Crimes

The time for CSS-Tricks is over. Now is the time for CSS Crimes! In this current landscape of content service providers, users are often limited to expressing themselves in text, links, and images. Sanitization rules tend to strip out HTML, … Committing CSS Crimes originally publ … | Continue reading


@css-tricks.com | 2 years ago

Zooming Images in a Grid Layout

Creating a grid of images is easy, thanks to CSS Grid. But making the grid do fancy things after the images have been placed can be tricky to pull off. Say you want to add some fancy hover effect to … Zooming Images in a Grid Layout originally published on CSS-Tricks, which is pa … | Continue reading


@css-tricks.com | 2 years ago

How I Added Scroll Snapping To My Twitter Timeline

CSS Scroll Snap allows websites to snap the web page or any other scroll container to a specific scroll position when the user performs a scrolling operation. This feature has been supported in all modern browsers for over two years, … How I Added Scroll Snapping To My Twitter Ti … | Continue reading


@css-tricks.com | 2 years ago

Actually, the San Francisco Typeface Does Ship as a Variable Font

Apple unveiled an expanded version of its San Francisco system font at WWDC 2022. Then, last month, Jim Nielsen zeroed in on the font’s variations, explaining how the font provides a spectrum of variations based on the width and weight… Actually, the San Francisco Typeface Does S … | Continue reading


@css-tricks.com | 2 years ago