Advertisement · 728 × 90

Posts by CSS-Tricks*

Years ago, creating CSS shapes was a tedious task. I had to find workarounds with a lot of gradients and math.

Now, using the shape() function, I can easily create complex shapes and animate them! 👇

1 day ago 19 2 0 0

It's on! 🔥

1 day ago 2 0 0 0
Video

A crap-ton of shape() inspiration from none other than @css-only.dev to help burn your Thursday.

css-tricks.com/complex-css-...

1 day ago 37 7 2 2

Has CSS gone too far?

2 days ago 2 1 0 0
Preview
Front-End Fools: Top 10 April Fools’ UI Pranks of All Time | CSS-Tricks These are the historical pranks I consider the top 10 most noteworthy, rather than the “best.” You’ll see that some of them crossed the line and/or backfired.

Front-End Fools: Top 10 April Fools’ UI Pranks of All Time

A little trip down memory lane. :)

css-tricks.com/front-end-ap...

2 days ago 6 0 0 0

The specification smells a little funny, but we've already implemented emulation for it.

2 days ago 9 2 0 0

LOL, some of the best tech exists but os never truly surfaced!

2 days ago 2 0 0 0
Preview
Sniffing Out the CSS Olfactive API | CSS-Tricks A deep sniff of the new CSS Olfactive API, a set of proposed features for immersive user experiences using smell.

Introducing the CSS Olfactive API

Something's s little... smelly about it. 👃

css-tricks.com/css-olfactiv...

2 days ago 14 4 1 2
Advertisement
Preview
What’s !important #8: Light/Dark Favicons, @mixin, object-view-box, and More | CSS-Tricks Short n’ sweet but ever so neat, this issue covers light/dark favicons, @mixin, anchor-interpolated morphing, object-view-box, new web features, and more.

Rounding up recent things that are worth having on your radar:

💥 SVG favicons and color scheme (@pawelgrzybek.com)
💥 Help shape @mixin (@lea.verou.me)
💥 Anchor-interpolated morphing (@chriscoyier.net)
💥 corner-shape UI elements (@utilitybend.com)

...and more:

css-tricks.com/whats-import...

3 days ago 21 3 0 1

💥 Firefox 149 and Safari 26.4 now allow for querying the @container name only. That way, we have an identifier without necessarily needing to query the container type.

developer.mozilla.org/en-US/docs/M...

developer.apple.com/documentatio...

The actual spec change:

github.com/w3c/csswg-dr...

1 week ago 17 2 0 0
Preview
Generative UI Notes | CSS-Tricks Looking at research and experiments that are designed to automatically generate user interfaces based on user preferences.

No spicy takes here, just genuine interest and notes on whatever the heck "Generative UI" is supposed to be.

css-tricks.com/generative-u...

1 week ago 3 2 0 0
Preview
JavaScript for Everyone: Destructuring | CSS-Tricks Mat Marquis and Andy Bell have released JavaScript for Everyone, an online course offered exclusively at Piccalilli. This post is an excerpt from the course taken specifically from a chapter all about...

Hey, spread the word: last week our pals over at @css-tricks.com published the entire JavaScript for Everyone lesson on destructuring.

These are some my personal favorite syntaxes, which are — and I simply cannot stress this point enough — very normal and in fact _cool_ things to feel ways about!

1 week ago 23 6 1 0
Video

So, corner-shape can be animated. Notice the added sprinkle of color-contrast().

css-tricks.com/experimentin...

1 week ago 46 5 0 0
Preview
What’s !important #7: random(), Folded Corners, Anchored Container Queries, and More | CSS-Tricks For this issue we have random(), folded clip-path corners, anchored container queries, customizable select, scroll-triggered animations, and more.

🔥 Another week of "ain't no time for all that" nicely reported by @dxnny.fun.

css-tricks.com/whats-import...

2 weeks ago 3 1 0 0
Preview
JavaScript for Everyone: Destructuring | CSS-Tricks Mat Marquis and Andy Bell have released JavaScript for Everyone, an online course offered exclusively at Piccalilli. This post is an excerpt from the course taken specifically from a chapter all about...

If you've been on the fence about @piccalil.li's JavaScript for Everyone course, first off: be like Nike and just do it.

We've published an excerpt from it about destructuring by none other than @wil.to to give you just a taste.

css-tricks.com/javascript-f...

2 weeks ago 14 4 0 0

Always working on the CSS-Tricks Almanac...

New entries covering scroll-driven animations (and a dash of view transitions)!

⭐️scroll-timeline-name: css-tricks.com/almanac/prop...

⭐️view-timeline-axis: css-tricks.com/almanac/prop...

⭐️timeline-scope: css-tricks.com/almanac/prop...

3 weeks ago 8 2 0 0
Preview
Chrome 146  |  Release notes  |  Chrome for Developers Scroll-triggered animations, Scoped custom element registries, and more.

🔥 Chrome 146 becomes the first browser to ship scroll-triggered animations.

developer.chrome.com/release-note...

3 weeks ago 21 1 2 1
A vertical column of folders with labels on the right fanned out and curving towards the right.

A vertical column of folders with labels on the right fanned out and curving towards the right.

Nice cards fanned out in a subtle arc.

Nice cards fanned out in a subtle arc.

Circular options with icons around another circular item in the center with a star icon.

Circular options with icons around another circular item in the center with a star icon.

Curious about custom <select>?

I wrote about some of my recent demos over at @css-tricks.com!

Take a look ✨ css-tricks.com/abusing-cust...

3 weeks ago 80 22 0 0
Advertisement
Video

A few wild examples of the customizable select have been floating around. Here are a few more from @patrickbrosset.com that push the envelope.

css-tricks.com/abusing-cust...

3 weeks ago 22 4 0 1
Preview
The Value of z-index | CSS-Tricks How we look at the stacking order of our projects, how we choose z-index values, and more importantly, the implications of those choices.

Aren't z-index values one of those things we all sorta struggle with? How we choose them, how we manage them, how we balance the stacking contexts, etc.

@amitsheen.bsky.social has a great way to approach it... all around tokens for intentional intentional layers.

css-tricks.com/the-value-of...

3 weeks ago 9 4 3 1
Preview
The Different Ways to Select <html> in CSS | CSS-Tricks Sure, we can select the <html> element in CSS with, you know, a simple element selector, html. But what other (trivial and perhaps useless) ways can we do it?

How many ways can you select <html> in CSS? @dxnny.fun says “challenge accepted” building off an exercise @css-only.dev did a little while back.

css-tricks.com/the-differen...

css-tip.com/root-selecto...

4 weeks ago 10 2 0 0
Preview
Yet Another Way to Center an (Absolute) Element | CSS-Tricks TL;DR: We can center absolute-positioned elements in three lines of CSS. And it works on all browsers!

A little gem @monknow.bsky.social stumbled into when working on something... we can center an absolutely positioned element with justify-self:

.element {
position: absolute;
place-self: center;
inset: 0;
}

He explains it nicely here:

css-tricks.com/yet-another-...

1 month ago 12 2 0 0
Preview
A Complete Guide to Bookmarklets | CSS-Tricks Browsers don't just let you bookmark web pages. You can also bookmark JavaScript, allowing you to do so much more than merely save pages.

A Complete Guide to Bookmarklets, by @vale.rocks (@csstricks@mastodon.social):

css-tricks.com/a-complete-guide-to-book...

#guides #bookmarklets #javascript #linklists

1 month ago 4 2 0 0
Preview
An Exploit ... in CSS?! | CSS-Tricks Read an explanation of the recent CVE-2026-2441 vulnerability that was labeled a "CSS exploit" that "allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page."

An Exploit... in CSS?!

Lee Meyer's sane, thoroughly reported, and well-grokked explanation of the recent CVE-2026-2441 vulnerability that was labeled a "CSS exploit" that "allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page."

css-tricks.com/an-exploit-i...

1 month ago 3 0 0 0

Firefox 148 makes shape() available without a flag, aligning with Chrome and Safari:

developer.mozilla.org/en-US/docs/M...

1 month ago 8 1 0 0
Advertisement

All the magazines are saying it. Bookmarklets are so in right now.

You may consider them obsolete in the face of shinier tools, but they prove themselves a solid, stable staple of any developer's toolbox.

Fast, stable, time-proven. What isn't to love?

#WebDev #FrontEndDevelopment

1 month ago 16 2 2 0
Preview
A Complete Guide to Bookmarklets | CSS-Tricks Browsers don't just let you bookmark web pages. You can also bookmark JavaScript, allowing you to do so much more than merely save pages.

Making your own bookmarklets doesn't have to be all that difficult, and @vale.rocks shows you how, step-by-step.

css-tricks.com/a-complete-g...

1 month ago 11 4 2 2
Preview
Loading Smarter: SVG vs. Raster Loaders in Modern Web Design | CSS-Tricks Let’s get nuanced in this article and discuss the capabilities of both SVG and raster imaged so that you can make informed decisions in your own work.

SVG or raster? The short answer to that question is: there’s almost no difference at all if you are working on something very small and specific.

But it's more nuanced than that, and @holasvg.com has all the nerdy details you need.

css-tricks.com/loading-smar...

1 month ago 14 2 0 0
Video

Here's @dxnny.fun poking at a new proposal that would allow an element to match an element when the pointer gets :near() it by a certain amount.

css-tricks.com/potentially-...

1 month ago 7 1 0 0

A few recent additions to the ol' Almanac to distract you on this lovely Friday:

❋ The sign() function
css-tricks.com/almanac/func...

❋ The progress() function
css-tricks.com/almanac/func...

❋ The abs() Function
css-tricks.com/almanac/func...

That progress() one... just wild.

1 month ago 4 2 0 0