Accessibility
An accessible pagination pattern (or two)
A couple of weeks ago I added pagination to my blog, and it was an interesting delve into the various designs and markup patterns that can be used.
Top Website Accessibility Testing Tools For Inclusive Web Design
Discover the top website accessibility testing tools to ensure your website is inclusive and meets accessibility standards. Explore free, automated, and comprehensive tools to enhance your web accessibility.
CSS
light-dark() isn't always the same as prefers-color-scheme
light-dark() and prefers-color-scheme treat the defined color-scheme values differently.
One CSS Trick to Eliminate Scrollbar Layout Shifts
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.
To address this issue, you can use the scrollbar-gutter CSS property, which allows you to reserve space for the scrollbar, preventing layout shifts when it appears or disappears.
Introduction to CSS if Statements and Conditional Logic
The new if() function is an exciting addition to the CSS toolbox. It brings inline conditional logic that previously required Sass or scattered media queries. By understanding how if() interacts with style, media and support queries, and by combining it with custom properties and data attributes, you can write more expressive, maintainable styles. Keep in mind its experimental status, so use this guide as a reference to experiment with CSS conditionals today and stay prepared for the future of responsive design.
Grid: how grid-template-areas offer a visual solution for your code
The beauty of grid-template-areas is that all of the decisions about where to place what element happen in a single property. You still have to do the upfront work of naming your elements, but once you’ve done that, you can visually see where everything is in relation to each other in a single place. Changing it is simpler too — just move the element name to a different “cell” and you’re done.
Using CSS to fix the irradiation illusion
Ever noticed how white text on a black background looks thicker than black text on a white background, even though the weights are the same?
This post teaches you how to account for this and adjust perceived font weight for dark mode without layout shift, with variable fonts and the GRAD axis.
CSS-in-JS: The Great Betrayal of Frontend Sanity
CSS-in-JS promised simplicity but delivered performance issues. Learn why ditching it for native CSS solutions leads to faster, more maintainable web apps.
Victorian-Style Lines for the Web: Elements of Identical Width
In this tutorial, we will take graphical borders from the 1800s and turn them into a repeating CSS border for your website. The following technique will work for border made of almost-identical repeating elements. We’ll use the free Inkscape illustration software.
The end result will be this kind of border that neatly fills the parent element, no matter what the parent’s width is.
Prevent a page from scrolling while a dialog is open
Chrome 144 features a small change to overscroll-behavior: it now also works on non-scrollable scroll containers. While this change might seem trivial, it fixes an issue developers have been dealing with for ages: prevent a page from scrolling while a (modal) <dialog> is open.
Gallery of Skewed Images with Hover Effect
Another classic component made easy with modern CSS and the new corner-shape. A gallery of skewed images with a reveal effect on hover using a few lines of code. The skewing adjusts accordingly to the direction of the text. Another direction-aware shape.
Masonry: Things You Won’t Need A Library For Anymore
CSS Masonry is almost here. Patrick Brosset takes a deep dive into what this long-awaited feature means for web developers and how you could make use of it in your own work.
Anchor Positioning and the Inset-Modified Containing Block (IMCB)
If you kinda understand Anchor Positioning, but it still surprises you from time to time, then most likely this is the missing piece of information: the Inset-Modified Containing Block (or IMCB for short).
Keeping link underline styles around inline code with padding
Addresses a common CSS problem: when you put an inline <code> snippet inside a hyperlink (<a>), any padding applied to that <code> element can cause the link’s underline to break or look awkward (with gaps where the padding is).
This happens because underlines in CSS apply only to the “text content,” not padding or margin — so adding padding inside the code element interrupts the underline.
Non-Square Image Blur Extensions
I recently came across this CodePen demo by Vivi Tseng, which creates the blur extension effect by placing a square div with a blur() beneath the img element and I couldn’t help but think a simpler solution should be possible with a single img element and minimal CSS.
Vanilla CSS is all you need
Back in April 2024, Jason Zimdars from 37signals published a post about modern CSS patterns in Campfire. He explained how their team builds sophisticated web applications using nothing but vanilla CSS. No Sass. No PostCSS. No build tools.
The post stuck with me. Over the past year and a half, 37signals has released two more products (Writebook and Fizzy) built on the same nobuild philosophy. I wanted to know if these patterns held up. Had they evolved?
I cracked open the source code for Campfire, Writebook, and Fizzy and traced the evolution of their CSS architecture. What started as curiosity became genuine surprise. These are not just consistent patterns. They are improving patterns. Each release builds on the last, adopting progressively more modern CSS features while maintaining the same nobuild philosophy.
These are not hobby projects. Campfire is a real-time chat application. Writebook is a publishing platform. Fizzy is a full-featured project management tool with kanban boards, drag-and-drop, and complex state management. Combined, they represent nearly 14,000 lines of CSS across 105 files.
Not a single line touches a build tool.
The Hidden Selectors of The HTML Element
Discover alternative selectors for the html element beyond the classic :root{} and html{}.
Are they useful? Probably not.
::target-text: An easy way to style text fragments
You’re reading a great blog post. You want to share it with your friend but instead of getting them to read the whole thing, you really just want to highlight a few key sentences and have them go directly to that section of the page. That’s what text fragments are for.
Is there something we developers can do to customize that experience for our users a bit more? Actually, there is! We’ll use the ::target-text pseudo-element to help us style our text fragment.
HTML
Is <style> in <body> a good idea?
Embedding <style> tags inside <body> can simplify development and reduce CSS bloat in some cases — but it comes with trade-offs: invalid HTML, potential rendering/flash issues, and downsides for security/maintainability.
Exploring Large HTML Documents On The Web
Most HTML documents are relatively small, providing a starting point for other resources on the page to load.
But why do some websites load several megabytes of HTML code? Usually it’s not that there’s a lot of content on the page, but rather that other types of resources are embedded within the document.
In this article, we’ll look at examples of large HTML documents around the web and peek into the code to see what’s making them so big.
It’s worth taking a quick look at your website HTML and to check what it actually contains. Often there are quick high-impact fixes you can make.
JavaScript
React has changed, your Hooks should too
Modern React has moved beyond overusing useEffect. Discover the Hook patterns that enable cleaner logic, fewer bugs, and scalable architecture in 2026.
kv.js: Advanced in-memory caching module for JavaScript
KV.JS is a fast, in-memory data store written in pure JavaScript, heavily inspired by Redis and Memcached. It is capable of handling multiple data types, including strings, lists, sets, sorted sets, hashes, and geospatial indexes. Additionally, with more than 140 functions, KV.JS supports a vast variety of operations, ranging from SET, GET, EXPIRE, DEL to INCR, DECR, LPUSH, RPUSH, SADD, SREM, HSET, HGET, and many many more.
webclone: A Node.js script designed to archive websites and download videos
WebClone.js is a lean, asynchronous, and powerful command-line tool for creating complete, offline archives of websites. It crawls a site, saves all pages and assets (CSS, JS, images), rewrites links for local viewing, and can even detect and download videos from popular streaming platforms.
VoxCSS: A DOM based voxel engine. Renders HTML cuboids by stacking CSS grid layers and applying 3D transforms
A DOM based voxel engine. Renders HTML cuboids by stacking CSS grid layers and applying 3D transforms. Supports colors and textures, interactions and culling, plus shapes and dimetric projections. Works with Vue, React, Svelte, or plain JavaScript.
The Nuances of JavaScript Typing using JSDoc
Perhaps it’s time to embrace real web open standard .js files which don’t require any build steps or tooling to execute properly, all while utilizing the power combo of JSDoc + tsc to gain all of the benefits of type hints in IDEs and type checking in CI.
maplibre-gl-layers: MapLibre's layer extension library enabling the display, movement, and modification of large numbers of dynamic sprite images
With MapLibre GL JS, you can place markers on a map, decorate their appearance, and move them freely. Markers often need to move smoothly, appear and disappear over time, and you may have countless coordinates to render.
Using this package, you can place and adjust large collections of sprites (marker images) through a straightforward API.
Demo page is here.
localspace: A library that unifies the APIs of IndexedDB, localStorage and other storage into a consistent API
Modern storage toolkit that keeps localForage compatibility while using async/await, TypeScript, and zero legacy baggage.
capo.js: Get your <head> in order
How you order elements in the <head> can have an effect on the (perceived) performance of the page.
This script helps you identify which elements are out of order.
The framework isn’t for you - you’re just along for the voyage
This is the part no one tells you when you reach for a JavaScript framework: it wasn’t built for you.
Miscellaneous
Hotwire - HTML Over The Wire
Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire. This makes for fast first-load pages, keeps template rendering on the server, and allows for a simpler, more productive development experience in any programming language, without sacrificing any of the speed or responsiveness associated with a traditional single-page application.
Baseline in action
Baseline in action is a collection of articles and demos showing you some of what's possible with features that are now Baseline.