4 Cool Hover Effects That Use CSS Text Shadow | CSS-Tricks

In my last article we saw how CSS background properties allow us to create cool hover effects. This time, we will focus on the CSS text-shadow property to explore even more interesting hovers. You are probably wondering how adding shadow to text can possibly give us a cool effect, but here’s the catch: we’re not actually going to make any shadows for these text hover effects. text-shadow but no text

Read More

How to Make a CSS Slinky in 3D | CSS-Tricks

Braydon Coyer recently launched a monthly CSS art challenge. He actually had reached out to me about donating a copy of my book Move Things with CSS to use as a prize for the winner of the challenge — which I was more than happy to do! The first month’s challenge? Spring. And when thinking of what to make for the challenge, Slinkys immediately came to mind. You know Slinkys,

Read More

COLRv1 and CSS font-palette | CSS-Tricks

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 web, even though the COLR font format has had full cross-browser support since 2018 (even in Internet Explorer!). The technology opens up an entirely new vein of typographic creativity. While some

Read More

Let’s Create a Tiny Programming Language | CSS-Tricks

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 strings to various kinds of machine code output. In short, a programming language is just a set of predefined rules. And to make them useful, you need something that understands

Read More

Useful Tools for Creating AVIF Images | CSS-Tricks

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 was finalized in February 2019 and released by Alliance for Open Media to the public. In this article, you will learn about some browser-based tools and command line tools for

Read More

6 Useful Bookmarklets to Boost Web Development | CSS-Tricks

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 Applying a background to everything Simulating events Setting cookies Toggling classes Color widget bookmark What other bookmarklets can you think of? Activating design mode Design mode (styled as designMode since

Read More

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

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. In this article, we will consider modern techniques to create unique corner shapes while trying to work from reusable code that allows us to produce different results by adjusting variables. Check

Read More

Adding CDN Caching to a Vite Build | CSS-Tricks

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 user browses to your site, and your site requests resources from the CDN, the CDN will route that request to the nearest edge location. If that location has the requested

Read More

Add a CSS Lens Flare to Photos for a Bright Touch | CSS-Tricks

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, a technique we can easily recreate in tools like Photoshop, then add to our sites as raster images. But what if we wanted to apply the same lens flare look without the

Read More

Making Mermaid Diagrams in Markdown | CSS-Tricks

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 might want to embed your CodePen demo directly in your documentation source, having your diagrams and charts live adjacent to your text helps prevent them from rotting — that is, drifting

Read More