
The Thirteenth Fourth
Well boy howdy. The 13th birthday of CSS-Tricks has rolled around. A proper teenager now, howabouthat? I always take the opportunity to do a bit of a state of
2,065 articles on Frontend.

Well boy howdy. The 13th birthday of CSS-Tricks has rolled around. A proper teenager now, howabouthat? I always take the opportunity to do a bit of a state of

Testing gives confidence in written code. In the context of this article, ‘testing’ means ‘automated testing’. Without automated testing, it is significantly harder to ensure the quality of a web application of significant complexity. Fails caused by automated testing may lead to more bugs in production. In this article, Chidi Orji is going to show you how React developers can quickly start testin

With Reanimated 2, the team at Software Mansion asked: “How would it look if there were no constraints when writing gestures and animations in React Native?” and started from there.

Statically generated sites or pre-rendering and server-side rendered applications are two modern ways to build front-end applications using JavaScript frameworks. These two modes, yet different, are often mixed up as the same thing and in this tutorial, Timi Omoyeni is going to show you the differences between them. You’ll learn what a server-side-rendered application is, as well as learn about fr

“Dark mode” is defined as a color scheme that uses light-colored text and other UI elements on a dark-colored background. Dark mode, dark theme, black mode, night mode… they all refer to and mean the same thing: a mostly-dark interface rather than a mostly-light interface.

Hard-stop gradients are one of my favorite CSS tricks. Here, Marcel Moreau combines that idea with CSS grid to solve an issue that's otherwise a pain in the

Here’s a fancy new experimental feature in Chrome! Now, we can get an overview of the CSS used on a site, from how many colors there are to the number of

The title of this Sara Soueidan article speaks to me. I'm a big fan of the idea that some CSS is best applied globally, and some CSS is best applied scoped to

We’re talking about CUBE CSS. What is it, and how does it differ from approaches such as BEM, SMACSS, and OOCSS? Drew McLellan talks to its creator, Andy Bell, to find out.

Recently, CSS has added a lot of new cool features such as custom properties and new functions. While these things can make our lives a lot easier, they can

Two things that strike me often about the web are how many ways there are to go about the same thing and how many considerations go into even the most

Ya know, for a site called "CSS-Tricks" that I've run for well over a decade, it's a little funny we've never done a book under that name. I've written a book

In this tutorial, Chidi Orji will show you how to work with Firebase push notifications in the backend and frontend. We’ll set up the notifications system with an Express back-end server. Afterwards, you’ll listen for the notifications in a React front-end app. You will implement the backend first, then move on to the frontend. In that way, you can use whichever section appeals more to you. So let

Sarah Higley has some CSS tricks up her sleeve for dealing with High Contrast Mode on Windows, which I learned is referred to as WHCM.

One of my forever-lessons here on CSS-Tricks is that having your own website and blogging on it is a good idea. It's probably one of the best decisions I've

This kind of SVG + CSS animation trickery is catnip to me. Mikael Ainalem shares how to draw a hamburger icon (the "three lines" thing you're well familiar

During July's Hackweek, the three of us rewrote Dropbox's full browser-side codebase to use CoffeeScript instead of JavaScript, and we've been really happy with how it's been going so far. This is a controversial subject, so we thought we'd start by explaining why...

This was always my favorite thing in Mad magazine. One page (the inside of the back cover, I think) was covered in a zany illustration. You folded that page

I've long been skeptical of quoting global browser usage percentages to justify their usage of browser features. It doesn't matter what global usage of a

When should we reach for CSS grid and when should we use flexbox? Rachel Andrew wrote about this very conundrum way back in 2016:

CSS still can't animate to auto dimensions.

Reactivity is one of Vue’s greatest features. It is also one of the most mysterious if you don’t know what it’s doing behind the scenes. Like, why does it

Building a well-functioning application requires good testing; otherwise, knowing whether your application works as expected would be a matter of guesswork and luck. Jest is one of the best tools available for testing React applications. In this article, Adeneye David Abiodun will show you everything you need to create a solid test for your React components and application.

HTML has an <input type="range">, which is, you could argue, the simplest type of proportion slider. Wherever the thumb of that slider ends up could

Since the inception of CSS in 1994, the cascade and inheritance have defined how we design on the web. Both are powerful features but, as authors, we've had

This is a neat little library. It uses SVG to insert hand-drawn looking annotations to elements (probably text), like underlines and box highlights (there are

In this article, we’ll be looking at a new way of retrieving data in React Apps named SWR. This is a set of hooks for remote data fetching that makes things easier, such as caching, pagination, and so on.

The <canvas> element in HTML and Canvas API in JavaScript combine to form one of the main raster graphics and animation possibilities on the web. A

The question of how and where to learn HTML & CSS is a highly reasonable thing to ask. The answer depends on all sorts of things: how serious you are,

I think of grids as arrangements of rectangles with vertical and horizontal lines running through. And they are, but that doesn't mean we can't still do

If you were to ask me what question I hear most about front-end development, I’d say it’s"How do I get better at CSS?". That question usually comes up after

With a very recent Safari update, Web Animations API (WAAPI) is now supported without a flag in all modern browsers (except IE). Here’s a handy Pen

In this article, we’re going to learn how to use Immer to write reducers. When working with React, we maintain a lot of state. To make updates to our state, we need to write a lot of reducers. Manually writing reducers results in bloated code where we have to touch almost every part of our state. This is tedious and error-prone. In this article, Chidi Orjil going to see how Immer brings more simpl

In this episode of the Smashing Podcast, we’re talking about learning React. What’s React like to work with, and how can experienced developers get started? Drew McLellan chats to Mina Markham to find out.

Adding Internationalization to your Vue.js application has a lot of use cases and in this tutorial, we’re going to learn how to do this with the Vue I18n plugin and how to set it up in our application.

Here's a two-second review. If an element has an ID, you can link to it with natural browser behavior. It's great if headings have them, because it's often

A CSS methodology from Andy Bell:

I needed a numbered list of blog posts to be listed with the last/high first and going down from there. Like this:

In this article, Adeneye David Abiodun explains how to build a facial recognition web app with React by using the Face Recognition API, as well as the Face Detection model and Predict API. The app built in this article is similar to the face detection box on a pop-up camera in a mobile phone — it’s able to detect a human face in any image fetched from the Internet. Please note that you will need t

You can create stripes in CSS. That’s all I thought about in terms of CSS background patterns for a long time. There’s nothing wrong with stripes; stripes are

Šime Vidas with the lowdown on what these pseudo-selectors are and why they will be useful:

I discovered CSS about a decade ago while trying to modify the look of a blog I had created. Pretty soon, I was able to code cool things with more

There's some interesting CSS trickery in Jason Pamental's latest Web Fonts & Typography News. Jason wanted to bring swipeable columns to his digital book

We can use JavaScript to get the value of a CSS custom property. Robin wrote up a detailed explanation about this in Get a CSS Custom Property Value with

In this tutorial, Shedrack Akintayo is going to learn about higher-order components, the syntax of higher-order components, as well as use cases for them. In the process, you will build a higher-order component from an existing React component. By the end of this tutorial, you will understand the basics of higher-order components and how to build them.

This article is about my experience using Brotli at production scale. Despite being really expensive and a truly unfeasible method for on-the-fly compression, Brotli is actually very economical and saves cost on many fronts, especially when compared with gzip or lower compression levels of Brotli.

It's useful when DevTools tells you that a declaration is invalid. For example, colr: red; isn't valid because colr isn't a valid property. Likewise color:

After just playing with apsect-ratio and being pleasantly surprised at how intuitive it is, here's an example of CSS acting unintuitively:

Only Firefox supports it, but if you return a request with a header like this:

If you’re a React developer who’d like to learn how you can start consuming APIs in your React applications, then this article is for you. Consuming REST APIs in a React Application can be done in various ways, but in this tutorial, Shedrack Akintayo will be discussing how we can consume REST APIs using two of the most popular methods known as Axios and Fetch API. You will learn what a REST API is

If you’ve ever wanted to add a pause between each iteration of your CSS @keyframes animation, you’ve probably been frustrated to find there’s no built-in way

Snook shows off a classic design with an oversized header up top, and a content area that is "pulled up" into that header area. My mind goes to the same place:

Rotated <table> column headers is something that’s been covered before right here on CSS-Tricks, so shout-out to that for getting me started and helping

In this article, Chidi Orji will explore the concept of error boundaries in a React application. You’ll work through an example app to see how we can use error boundaries to deliver a better app experience. Finally, you’ll integrate Sentry into our error boundary for realtime error reporting. The only prerequisite is that you have some familiarity with React class components. Let’s dig in!

Increment is a beautiful quarterly magazine (print and web) published by Stripe "about how teams build and operate software systems at scale". While there is

With a preprocessor, like Sass, building a logical "do this or don't" setting is fairly straightforward:

Diana Smith with another mind-bending all HTML & CSS painting.

Pug is a template engine that allows you to write cleaner templates with less repetition. In Angular, you can use Pug to write component templates and improve a project’s development workflow. In this article, Zara Cooper In will cover how you — as an Angular developer — can use Pug to write better templates more efficiently. You’ll learn how to install Pug in your Angular apps and transition exis

Manuel Matuzović details 10 bad HTML patterns for a close button. You know, stuff like this:

Today at Jamstack_Conf, Netlify announced Build Plugins. What it does is allow you to have particular hooks for events within your build, like when the build