When you’re working with fonts, especially for displaying numbers, there’s something called proportional spacing that can make a huge difference in how your numbers look when they’re animated. Essentially, most fonts (apart from monospaced fonts) use proportional spacing, which means that each character takes up a different amount of horizontal space. This can lead to numbers looking uneven and misaligned,…
Amit Merchant
https://www.amitmerchant.com/ · 10 posts · history since 2025 · active
5 Mar
7 Feb
The Laravel team recently released the Laravel AI SDK that provides a simple and elegant way to integrate AI capabilities into your Laravel applications. The SDK offers a clean and intuitive API that allows developers to easily interact with AI models and services. Essentially, the Laravel AI SDK abstracts away the complexities of working with AI models (such as OpenAI,…
15 Jan
I was reading the article Sounds on The Web by Raphael Salaja the other day. The article explains the importance of sounds in web applications and how integrating them just enough can dramatically enhance user experience by providing feedback and improving usability. It’s a really well-written piece that I highly recommend you to read. But I was wondering what they…
12 Jan
So, lately, I have been exploring Haley Park’s website and it’s pretty cute and well designed. What caught my attention, though, was this water ripple effect on one of the text snippets. Here’s what it looks like. Breathe .text-container { display: flex; justify-content: center; align-items: center; } .ripple-text { position: relative; filter: url(#water-ripple); display: inline-block; font-size: 3rem; font-weight: bold; color:…
12 Dec 2025
You know how sometimes you want to ensure that a value stays within a specific range? Maybe you’re working with user input, configuration values, or any scenario where you need to enforce boundaries. In scenarios like these, having a built-in function to clamp values can be incredibly useful. Well, good news! PHP 8.6 will be introducing a new function called…
5 Dec 2025
Ever reach for a simple callback and end up writing a tiny novella—an arrow function stuffed with types, reordered parameters, and boilerplate just to pass one value through? Well, it looks like PHP 8.6 is set to make our lives easier with the introduction of Partial Function Application. What is Partial Function Application? A real-world example Common PFA patterns In…
28 Nov 2025
When a webpage’s content exceeds the viewport height, browsers typically introduce a vertical scrollbar. This can lead to layout shifts, especially when navigating between pages or toggling content visibility, as the presence or absence of the scrollbar alters the available width for content. For instance, I faced this issue in one of my apps where once the content overflows, the…
13 Nov 2025
For years, we’ve faked “characterful” corners with SVG masks, pseudo-elements, and more than a few headaches. The problem? Border-radius only controls size, not shape. The experimental (and fairly new) corner-shape property changes all that by letting us define the actual shape of an element’s corners directly in CSS. Squircles! I’m looking at you. With a single declaration, we can turn…
19 Oct 2025
PHP’s parse_url was not compliant with RFC 3986 (generic, permissive URIs) or WHATWG URL (browser-style URLs), leading to inconsistent behavior, interoperability problems with tools like cURL, and subtle security issues such as parsing confusion. To fix these issues, PHP 8.5 introduces a standardized API so URIs/URLs are parsed, normalized, modified, and compared consistently with the relevant specs. PHP now ships…
8 Oct 2025
Imagine a responsive hero image that becomes more transparent as the viewport gets narrower, helping text readability on small screens or a card that scales up slightly as the viewport grows, adding a subtle polish. Until now, achieving these effects required complex calc() expressions or JavaScript, often leading to brittle solutions. But with the new CSS progress() function, you can…