Home/CSS-Tricks
Source

CSS-Tricks

1,207 articles from CSS-Tricks.

Frontend — Custom Properties as State

Custom Properties as State

Here's a fun idea from James Stanley: a CSS file (that presumably updates daily) containing CSS custom properties for "seasonal" colors (e.g. spring is

CCChris Coyier·January 5, 2021Frontend
Engineering — Cloudinary Tricks for Video

Cloudinary Tricks for Video

Creating video is time consuming. A well-made 5-minute video can take hours to plan, record, and edit — and that's before we start talking about

JLJason LengstorfJason Lengstorf·December 30, 2020Engineering
Frontend — Integrating TypeScript with Svelte

Integrating TypeScript with Svelte

Svelte is one of the newer JavaScript frameworks and it’s rapidly rising in popularity. It’s a template-based framework, but one which allows for arbitrary

ARAdam RackisAdam Rackis·December 24, 2020Frontend
Frontend — "Yes or No?"

"Yes or No?"

Sara Soueidan digs into this HTML/UX situation. "Yes" or "no" is a boolean situation. A checkbox represents this: it's either on or off (uh, mostly). But is a

CCChris Coyier·December 22, 2020Frontend
Frontend — Recognizing Constraints

Recognizing Constraints

There’s a “C” word in web development that we don’t give enough attention to. No, I’m not talking about “continuous integration”, or even “CSS”. The “C” word

JWJeremy Wagner·December 22, 2020Frontend
Career & Teams — Retrospective on Fela

Retrospective on Fela

I really appreciate a real-world walkthrough of a technology. Not only in what that technology does, but why it was chosen and how it worked for a team.

CCChris Coyier·December 21, 2020Career & Teams
Engineering — Optimizing Image Depth

Optimizing Image Depth

Something I learned (or, I guess, re-learned) this year is how important it is to pay close attention to the bit depth of images. Way back in the day, we used

EMEric MeyerEric Meyer·December 18, 2020Engineering
Engineering — Change vs. Inertia

Change vs. Inertia

Recently, I've become more deeply aware of the inherent tension between change and inertia, as it applies to the evolution and use of web technologies. These

KSKyle Simpson·December 18, 2020Engineering
Engineering — What's Old is New

What's Old is New

This year, I learned a lot about how "old" tricks can solve a lot of modern problems if you use the right tools. Following the growth of Jamstack-style

CWCassidy WilliamsCassidy Williams·December 17, 2020Engineering
Frontend — Write Code, Get Confetti

Write Code, Get Confetti

This year I learned about the canvas-confetti npm package. It is a simple JavaScript package that injects a (virtual, <canvas>) confetti explosion into

FSFred Schott·December 16, 2020Frontend
Engineering — Learning to Simplify

Learning to Simplify

When I first got this writing prompt, my mind immediately started thinking stuff like, “What tech have I learned this year?” But this post isn’t really about

ABAndy BellAndy Bell·December 16, 2020Engineering
Performance — Slow Movement

Slow Movement

There was a time when I felt overwhelmed by how fast the web developed. It seemed like not a single day passed without a new plugin, framework, technique, or

MMManuel Matuzovic·December 16, 2020Performance
Engineering — The Power of Lampshading

The Power of Lampshading

I enjoyed this blog post from Shawn. Lampshading is apparently the idea of a TV show calling attention to some weakness (like an implausible plot point) so

CCChris Coyier·December 16, 2020Engineering
Frontend — Hell Yes! CSS!

Hell Yes! CSS!

Speaking of cool CSS stuff you can buy, Julia Evans' zine Hell Yes! CSS! is hot off the presses. A "zine" being 28 pages of "short, informative, and fun

CCChris Coyier·December 15, 2020Frontend
Frontend — Give Users Control: The Media Session API

Give Users Control: The Media Session API

Here’s a scenario. You start a banging Kendrick Lamar track in one of your many open browser tabs. You’re loving it, but someone walks into your space and you

IUIdorenyin UdohIdorenyin Udoh·December 14, 2020Frontend
Engineering — Why I love Tailwind

Why I love Tailwind

Max Stoiber wrote some interesting notes about why he loves Tailwind. (Max created styled-components, so he has some skin in the styling methodology game.)

RRRobin RendleRobin Rendle·December 11, 2020Engineering
Engineering — Unconventional Stock Image Sources

Unconventional Stock Image Sources

This year, I learned that there is a wide world of free stock imagery available beyond Unsplash and Pexels. You see, I’ve been working on designing WordPress

MCMel ChoyceMel Choyce·December 10, 2020Engineering
Frontend — npm ruin dev

npm ruin dev

In 2020, I rediscovered the enjoyment of building a website with plain ol’ HTML, CSS, and JavaScript — no transpilin’, no compilin’, no build tools other than

JKJeremy KeithJeremy Keith·December 9, 2020Frontend
Frontend — TypeScript & Relevance

TypeScript & Relevance

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

JAJake Albaugh·December 8, 2020Frontend
Frontend — Very Extremely Practical CSS Art

Very Extremely Practical CSS Art

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

MSMiriam Suzanne·December 8, 2020Frontend
Performance — Web Performance Calendar

Web Performance Calendar

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

RRRobin RendleRobin Rendle·December 7, 2020Performance
Engineering — Painting With the Web

Painting With the Web

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:

CCChris Coyier·December 1, 2020Engineering
Design & UX — Under-Engineered Responsive Tables

Under-Engineered Responsive Tables

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

CCChris Coyier·December 1, 2020Design & UX
Frontend — Native CSS Masonry Layout In CSS Grid

Native CSS Masonry Layout In CSS Grid

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

CCChris Coyier·November 30, 2020Frontend
Frontend — Super Tiny Icons

Super Tiny Icons

A bunch of SVG icons (of popular things) all under 1KB. SVG is awesome for golfing.

CCChris Coyier·November 30, 2020Frontend
Frontend — Creating UI Components in SVG

Creating UI Components in SVG

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

SDSarah DrasnerSarah Drasner·November 23, 2020Frontend
Frontend — Graphery SVG

Graphery SVG

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

CCChris Coyier·November 23, 2020Frontend
Frontend — Thinking Outside the Box with CSS Grid

Thinking Outside the Box with CSS Grid

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

CCChris Coyier·November 18, 2020Frontend
Engineering — Upptime

Upptime

GitHub Actions are like free computers.

CCChris Coyier·November 18, 2020Engineering
Frontend — Copyediting with Semantic HTML

Copyediting with Semantic HTML

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

JRJohn RheaJohn Rhea·November 17, 2020Frontend
Frontend — Jetpack Backup

Jetpack Backup

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

GGGeoff GrahamGeoff Graham·November 17, 2020Frontend
Frontend — CSS Background Patterns

CSS Background Patterns

Nice little tool from Jim Raptis: CSS Background Patterns. A bunch of easy-to-customize and copy-and-paste backgrounds that use hard stop CSS gradients to

CCChris Coyier·November 16, 2020Frontend
Engineering — My WordPress Comments Wishlist

My WordPress Comments Wishlist

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

CCChris Coyier·November 11, 2020Engineering
Frontend — Libraries for SVG Drawing Animations

Libraries for SVG Drawing Animations

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.

LILinda IkechukwuLinda Ikechukwu·November 11, 2020Frontend