Skip to main content
SiteScan.top

Browsers Can Now Compute Through CSS Layout

CSS computing via layout: how modern browsers calculate widths, sums and positions without JavaScript, and what it means for site auditing and optimization

Blog · Published: 28 November 2026 · 4 min read

An experimental technique known as CSS computing shows that a browser can do more than just lay out a page — it can perform mathematical operations without a single line of script. A detailed description of the method is published in Browsers Can Now Compute Through CSS Layout, which explains how to get a sum, a maximum or an order of elements directly from the layout algorithms.

Abstract illustration of CSS computing in a browser

How CSS computing works through layout

The idea behind CSS computing is that the browser already calculates column widths, sums in flex rows, and the order of elements as part of normal page rendering. The developer just needs to "read" the finished result back as a number and use it further.

This is achieved by combining several modern CSS capabilities.

This approach turns an ordinary grid or flex container into a computing block: one auto column finds the maximum among its children, while order arranges them by value, effectively performing a sort without a single calc() formula.

Why this matters for script-free sites

For services that check and audit websites, these techniques are interesting primarily because CSS computing works even where JavaScript is disabled by a security policy, blocked by an extension, or simply fails to load. HTML and CSS remain the foundation the browser is guaranteed to render regardless.

In practice, this means that part of the logic — comparing values, calculating a sum, building a simple chart — can be shifted to the layout level. This approach reduces the interface's dependence on scripts and increases the page's resilience to failures of individual resources.

Performance and the limits of the method

Comparisons show that calc() combined with layout outperforms plain calc() on sorting and ranking tasks: formulas for determining an element's position among fifty values with plain calc() balloon to thousands of comparisons, whereas layout handles this work through its normal rendering order, at virtually no extra cost.

At the same time, the method relies on fairly new platform capabilities — container query units, anchors and math functions in CSS only became widely available in the past couple of years. This means that before adopting such techniques, it's worth checking compatibility with the target browsers of a given site's audience.

What this means for the future of the web

For site owners and technical optimization specialists, experiments like this are a good reason to take a closer look at which parts of an interface truly require JavaScript, and which logic can be reliably and efficiently implemented with markup alone, without losing functionality under any environment constraints.

Check how much of this is on your own site

A free scan surfaces broken links, JS errors and performance problems in about a minute.