Amir Maghami | Blogs

Blogs

A collection of my thoughts, tutorials, and insights on web development.

Scroll-Driven Sticky Heading

Scroll-Driven Sticky Heading

I was playing around with scroll-driven animations, just searching for all sorts of random things you could do. That’s when I came up with the idea to animate main headings and, using scroll-driven animations, change the headings based on the user’s scroll position.

Read More
Better CSS Shapes Using shape() — Part 4: Close and Move

Better CSS Shapes Using shape() — Part 4: Close and Move

The shape() function's close and move commands may not be ones you reach for often, but are incredibly useful for certain shapes.

Read More
The Gap Strikes Back: Now Stylable

The Gap Strikes Back: Now Stylable

Styling the space between layout items — the gap — has typically required some clever workarounds. But a new CSS feature changes all that with just a few simple CSS properties that make it easy, yet also flexible, to display styled separators between your layout items.

Read More
Using CSS Cascade Layers With Tailwind Utilities

Using CSS Cascade Layers With Tailwind Utilities

Being the bad boy I am, I don't take Tailwind's default approach to cascade layers as the "best" one. Over a year experimenting with Tailwind and vanilla CSS, I've come across what I believe is a better solution.

Read More
CSS Blob Recipes

CSS Blob Recipes

Blob, Blob, Blob. What's the most effective way to create blob shapes in CSS? Turns out, as always, there are many. Let's compare them together!

Read More
Poking at the CSS if() Function a Little More: Conditional Color Theming

Poking at the CSS if() Function a Little More: Conditional Color Theming

The CSS if() function enables us to use values conditionally, but what exactly does if() do? Let's look at a possible real-world use case.

Read More
Lightly Poking at the CSS if() Function in Chrome 137

Lightly Poking at the CSS if() Function in Chrome 137

The CSS if() function was recently implemented in Chrome 137, making it the first instance where we have it supported by a mainstream browser. Let's poke at it a bit at a very high level.

Read More
A Better API for the Intersection and Mutation Observers

A Better API for the Intersection and Mutation Observers

Zell discusses refactoring the Resize, Mutation, and Intersection Observer APIs for easier usage, demonstrating how to implement callback and event listener patterns, while highlighting available options and methods.

Read More
Color Everything in CSS

Color Everything in CSS

An introduction to "Color spaces", "Color models", "Color gamuts," and basically all of the "Color somethings" in CSS.

Read More