COLRv1 and CSS font-palette: Web Typography Gets Colorful

According to Toshi Omagari, the author of Arcade Game Typography, the world’s first multi-colored digital font was created in 1982 for a never-released video game called Insector. Multi-colored fonts, sometimes called chromatic type, are still relatively rare on the … COLRv1 and … | Continue reading


@css-tricks.com | 2 years ago

Let’s Create a Tiny Programming Language

By now, you are probably familiar with one or more programming languages. But have you ever wondered how you could create your own programming language? And by that, I mean: A programming language is any set of rules that convert … Let’s Create a Tiny Programming Language origin … | Continue reading


@css-tricks.com | 2 years ago

Useful Tools for Creating AVIF Images

AVIF (AV1 Image File Format) is a modern image file format specification for storing images that offer a much more significant file reduction when compared to other formats like JPG, JPEG, PNG, and WebP. Version 1.0.0 of the AVIF specification … Useful Tools for Creating AVIF Ima … | Continue reading


@css-tricks.com | 2 years ago

How to Serve a Subdomain as a Subdirectory

Let’s say you have a website built on a platform that excels at design and it’s available at example.com. But that platform falls short at blogging. So you think to yourself, “What if I could use a different blogging … How to Serve a Subdomain as a Subdirectory originally publish … | Continue reading


@css-tricks.com | 2 years ago

Syntax Highlighting (and More!) With Prism on a Static Site

So, you’ve decided to build a blog with Next.js. Like any dev blogger, you’d like to have code snippets in your posts that are formatted nicely with syntax highlighting. Perhaps you also want to display line numbers in the … Syntax Highlighting (and More!) With Prism on a Static … | Continue reading


@css-tricks.com | 2 years ago

Adding Custom GitHub Badges to Your Repo

If you’ve spent time looking at open-source repos on GitHub, you’ve probably noticed that most of them use badges in their README files. Take the official React repository, for instance. There are GitHub badges all over the README file that communicate important dynamic info, lik … | Continue reading


@css-tricks.com | 2 years ago

Creating Realistic Reflections With CSS

In design, reflections are stylized mirror images of objects. Even though they are not as popular as shadows, they have their moments — just think about the first time you explored the different font formats in MS Word or PowerPoint: … Creating Realistic Reflections With CSS orig … | Continue reading


@css-tricks.com | 2 years ago

Creating the DigitalOcean Logo in 3D With CSS

Howdy y’all! Unless you’ve been living under a rock (and maybe even then), you’ve undoubtedly heard the news that CSS-Tricks, was acquired by DigitalOcean. Congratulations to everyone! 🥳 As a little hurrah to commemorate the occasion, I wanted to … Creating the DigitalOce … | Continue reading


@css-tricks.com | 2 years ago

Setting Up CloudFront to Host Your Web App

In my last article, we went over how to set up a web app that serves chunks and bundles of CSS and JavaScript from CloudFront. We integrated it into Vite so that when the app runs in a browser, … Setting Up CloudFront to Host Your Web App originally published on CSS-Tricks. You s … | Continue reading


@css-tricks.com | 2 years ago

Cool Hover Effects That Use Background Properties

A while ago, Geoff wrote an article about a cool hover effect. The effect relies on a combination of CSS pseudo-elements, transforms, and transitions. A lot of comments have shown that the same effect can be done using background … Cool Hover Effects That Use Background Propertie … | Continue reading


@css-tricks.com | 2 years ago

Avoiding the Pitfalls of Nested Components in a Design System

When creating a component-based, front-end infrastructure, one of the biggest pain points I’ve personally encountered is making components that are both reusable and responsive when there are nested components within components. Take the following “call to action” (… Avoiding the … | Continue reading


@css-tricks.com | 2 years ago

Writing Strong Front-end Test Element Locators

Automated front-end tests are awesome. We can write a test with code to visit a page — or load up just a single component — and have that test code click on things or type text like a user would, … Writing Strong Front-end Test Element Locators originally published on CSS-Tricks. … | Continue reading


@css-tricks.com | 2 years ago

Adding Tailwind CSS to New and Existing WordPress Themes

In the 15 or so years since I started making WordPress websites, nothing has had more of an impact on my productivity — and my ability to enjoy front-end development — than adding Tailwind CSS to my workflow (and it … Adding Tailwind CSS to New and Existing WordPress Themes origi … | Continue reading


@css-tricks.com | 2 years ago

Making Mermaid Diagrams in Markdown

Mermaid diagrams and flowcharts have been gaining traction, especially with GitHub’s announcement that they are natively supported in Markdown. Let’s take a look at what they are, how to use them, and just as importantly: why. Just like you … Making Mermaid Diagrams in Markdown o … | Continue reading


@css-tricks.com | 2 years ago

Add a CSS Lens Flare to Photos for a Bright Touch

I’m a big fan of movies by J.J. Abrams. I enjoy their tight plots, quippy dialog, and of course: anamorphic lens flares. Filmmakers like Abrams use lens flare to add a dash of ‘homemade’ realism to their movies, … Add a CSS Lens Flare to Photos for a Bright Touch originally publi … | Continue reading


@css-tricks.com | 2 years ago

Adding CDN Caching to a Vite Build

Content delivery networks, or CDNs, allow you to improve the delivery of your website’s static resources, most notably, with CDN caching. They do this by serving your content from edge locations, which are located all over the world. When a … Adding CDN Caching to a Vite Build or … | Continue reading


@css-tricks.com | 2 years ago

Tricks to Cut Corners Using CSS Mask and Clip-Path Properties

We recently covered creating fancy borders with CSS mask properties, and now we are going to cut the corners with CSS mask and clip-path! A lot of techniques exist to cut different shapes from the corners of any element. … Tricks to Cut Corners Using CSS Mask and Clip-Path Proper … | Continue reading


@css-tricks.com | 2 years ago

6 Useful Bookmarklets to Boost Web Development

A bookmarklet is a JavaScript-based bookmark that adds to a web browser. I’d like to show you some awesome web browser hacks to aid your web development workflow and how to convert those hacks into time-saving bookmarklets. Activating design mode … 6 Useful Bookmarklets to Boost … | Continue reading


@css-tricks.com | 2 years ago

Write HTML, the HTML Way (Not the XHTML Way)

You may not use XHTML (anymore), but when you write HTML, you may be more influenced by XHTML than you think. You are very likely writing HTML, the XHTML way. What is the XHTML way of writing HTML, and what … Write HTML, the HTML Way (Not the XHTML Way) originally published on CS … | Continue reading


@css-tricks.com | 2 years ago

Optimizing SVG Patterns to Their Smallest Size

I recently created a brick wall pattern as part of my #PetitePatterns series, a challenge where I create organic-looking patterns or textures in SVG within 560 bytes (or approximately the size of two tweets). To fit this constraint, I have … Optimizing SVG Patterns to Their Small … | Continue reading


@css-tricks.com | 2 years ago

CSS-Tricks has been acquired by DigitalOcean

Hey hey! | Continue reading


@css-tricks.com | 2 years ago

Say Hello to selectmenu, a Fully Style-able select Element

I want to introduce you to a new, experimental form control called selectmenu, including how much easier it is to style than a traditional element. | Continue reading


@css-tricks.com | 2 years ago

Build Membership Businesses with Memberful

What would your business be like if you sold memberships? It might be more than fun to think about, in fact, it might just be transformative. With membership, | Continue reading


@css-tricks.com | 2 years ago

7 Fresh Links on Performance For March 2022

I have a handful of good links to articles about performance that are burning a hole in my bookmarks folder, and wanna drop them here to share. | Continue reading


@css-tricks.com | 2 years ago

How to Make a “Raise the Curtains” Effect in CSS

“Raise the curtains” is an effect where the background and content both change color while scrolling over a sticky element. | Continue reading


@css-tricks.com | 2 years ago

CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web

The CSS Custom Highlight API is the future of styling text ranges on the web, allowing us to call out text without inserting new DOM elements. | Continue reading


@css-tricks.com | 2 years ago

Ahmad Shadeed: Use Cases For CSS fit-content

Ahmad Shadeed covers the CSS fit-content sizing keyword. It's useful! It just doesn't come up super often. I find myself using min-content a lot more, like | Continue reading


@css-tricks.com | 2 years ago

Web Component Pseudo-Classes and Pseudo-Elements are Easier Than You Think

::part, in short, allows you to pierce the shadow tree, which is just my Lord-of-the-Rings-y way to say it lets you style elements inside the shadow DOM from | Continue reading


@css-tricks.com | 2 years ago

Trailing Slashes on URLs: Contentious or Settled?

A fun deep dive from Zach. Do you have an opinion on which you should use? | Continue reading


@css-tricks.com | 2 years ago

When to Avoid the text-decoration Shorthand Property

In my recent article about CSS underline bugs in Chrome, I discussed text-decoration-thickness and text-underline-offset, two relatively new and | Continue reading


@css-tricks.com | 2 years ago

Manuel Matuzovic’s CSS Specificity Demo

If you're looking for a primer on CSS specificity, we've got that. And if you're trying to get ahead of the game, you should be aware of CSS Cascade Layers as | Continue reading


@css-tricks.com | 2 years ago

My white whale: A use case for will-change

The will-change property landed in major browsers in August 2015, and I've been on the lookout for when to use it ever since. | Continue reading


@css-tricks.com | 2 years ago

Explain the First 10 Lines of Twitter’s Source Code to Me

A question I always like to ask when interviewing a front-end candidate is: "Explain the first ten or so lines of the Twitter source code to me." | Continue reading


@css-tricks.com | 2 years ago

Superior Image Optimization: An Ideal Solution Using Gatsby & ImageEngine

In recent years, the Jamstack methodology for building websites has become increasingly popular. Performance, scalable, and secure, it’s easy to see why it’s | Continue reading


@css-tricks.com | 2 years ago

CSS Database Queries? Sure We Can!

Kinda silly sounding, isn't it? CSS database queries. But, hey, CSS is capable of talking to other languages. | Continue reading


@css-tricks.com | 2 years ago

5 Accessibility Quick Wins You Can Implement Today

Even seemingly small accessibility improvements can have nice quality of life benefits for many people. In that spirit, here are five accessibility quick wins you can implement today. | Continue reading


@css-tricks.com | 2 years ago

Before I go: When it comes to complaining about web browsers

That's a damn one-two punch from Dave. He goes for the ultimate clickbait title¹, then follows up with a pile of epic advice for us all. If you want web | Continue reading


@css-tricks.com | 2 years ago

Reliably Send an HTTP Request as a User Leaves a Page

On several occasions, I’ve needed to send off an HTTP request with some data to log when a user does something like navigate to a different page or submit a | Continue reading


@css-tricks.com | 2 years ago

A Complete Guide to CSS Cascade Layers

This is your complete guide to CSS cascade layers, a CSS feature that allows us to define explicit contained layers of specificity. | Continue reading


@css-tricks.com | 2 years ago

Comparing Node JavaScript to JavaScript in the Browser

Node JavaScript is a great way to write server-side code. This article shows how to write your own APIs and tools using Node. | Continue reading


@css-tricks.com | 2 years ago

(Jay Freestone’s) Front-End Predictions for 2022

I linked to Jay's front-end predictions last year and I think they panned out pretty well. | Continue reading


@css-tricks.com | 2 years ago

Subsetting Font Awesome to Improve Performance

By subsetting Font Awesome, we can remove any unused glyphs from the font files that it provides to reduce the overall file size. | Continue reading


@css-tricks.com | 2 years ago

Top Things You Didn’t Know You Could Do With Netlify CLI

First things first, if you didn't know Netlify had a CLI, they do.  One of my favorite things about it running the command netlify dev on nearly any | Continue reading


@css-tricks.com | 2 years ago

Add-to-Calendar Button UI Widget

A useful little UI widget. Click the add-to-calendar button, get a list of calendar apps, the user selects which one, and they get a download. | Continue reading


@css-tricks.com | 2 years ago

An Auto-Filling CSS Grid With Max Columns of a Minimum Size

Within Drupal 10 core, we’re implementing a new auto-filling CSS Grid technique that I think is cool enough to share with the world. | Continue reading


@css-tricks.com | 2 years ago

GSAP Flip Plugin for Animation

Greensock made the GSAP Flip plugin free. FLIP is an animation concept that helps make super performance state-change animations. | Continue reading


@css-tricks.com | 2 years ago

6 Creative Ideas for CSS Link Hover Effects

If you’ve ever found yourself stumped trying to make a slick hover effect, then I have six CSS link hover effects for you to check out. | Continue reading


@css-tricks.com | 2 years ago

WordPress.com Has a New Home on YouTube

✋ High fives to WordPress for releasing version 5.9 on January 29! This was the long-awaited introduction of the Site Editor and the reverberations are | Continue reading


@css-tricks.com | 2 years ago