Amir Maghami | Blogs

Blogs

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

The Range Syntax Has Come to Container Style Queries and if()

The Range Syntax Has Come to Container Style Queries and if()

Being able to use the range syntax with container style queries — which we can do starting with Chrome 142 — means that we can compare literal numeric values as well as numeric values tokenized by custom properties or the attr() function.

Read More
Headings: Semantics, Fluidity, and Styling — Oh My!

Headings: Semantics, Fluidity, and Styling — Oh My!

A few links about headings that I've had stored under my top hat.

Read More
Explaining the Accessible Benefits of Using Semantic HTML Elements

Explaining the Accessible Benefits of Using Semantic HTML Elements

Why should you use a semantic <button> instead of a generic <div>? Accessibility, right? By how exactly does it help accessibility?

Read More
The “Most Hated” CSS Feature: tan()

The “Most Hated” CSS Feature: tan()

Last time, we discussed that, sadly, according to the State of CSS 2025 survey, trigonometric functions are deemed the “Most Hated” CSS feature.…

Read More
Getting Creative With Small Screens

Getting Creative With Small Screens

On mobile, people can lose their sense of context and can’t easily tell where a section begins or ends. Good small-screen design can help orient them using a variety of techniques.

Read More
Pure CSS Tabs With Details, Grid, and Subgrid

Pure CSS Tabs With Details, Grid, and Subgrid

Can we use the <details> element as the foundation for a tabbed interface? Why yes, we can!

Read More
CSS Animations That Leverage the Parent-Child Relationship

CSS Animations That Leverage the Parent-Child Relationship

When we change an element’s intrinsic sizing, its children are affected, too. This is something we can use to our advantage.

Read More
An Introduction to JavaScript Expressions

An Introduction to JavaScript Expressions

A thorough but approachable lesson on JavaScript expressions excerpted JavaScript For Everyone, a complete online course offered by our friends at Piccalilli.

Read More
Building a Honeypot Field That Works

Building a Honeypot Field That Works

Honeypots are fields that developers use to prevent spam submissions. They still work in 2025. But you got to set a couple of tricks in place so spambots can’t detect your honeypot field.

Read More