Moving beyond the web’s 30‑year reliance on rectangular layouts
The era of box‑dominated web design is ending. A new suite of CSS features—including the shape() function, along with the border-shape and corner-shape properties—gives designers and their AI assistants a broader toolkit for creating fluid, non‑rectangular layouts.
When the W3C released its first web‑page layout standard in 1996, sites mirrored the grid‑based formats of academic journals, newspapers, and magazines.
At that time graphics drivers and browser rendering engines were rudimentary. Developers, still adapting to a new medium, found it simplest to flow text within spaces defined by basic geometric coordinates.
Today print is largely obsolete, developers are more experienced (and AI can fill gaps), and GPUs are vastly more powerful. There is no longer any need to confine web pages to squares.
In Edwin A. Abbott’s 1884 proto‑science‑fiction tale Flatland: A Romance of Many Dimensions, a two‑dimensional resident is suddenly thrust into three dimensions—a startling revelation. Likewise, web developers may feel a similar sense of wonder when they first experiment with these new CSS constructs.
Dev’s choice: vertical or horizontal
Originally, HTML and CSS could only draw horizontal or vertical lines or borders. Achieving more elaborate layouts required proprietary plug‑ins such as Java Applets, Macromedia/Adobe Flash, or labor‑intensive JavaScript workarounds.
SVG was the first technology to break the web’s boxiness, letting developers render curves, squiggles, logos, or any arbitrary shape by defining a series of numerical coordinates (though this is tedious, image‑to‑SVG converters can help). However, SVG was confined to a canvas placed on a page, while CSS governed the overall page layout.
The earliest attempt to merge the two approaches was the path() function, which allowed SVG to be embedded directly in CSS. Yet path() had drawbacks: it was not responsive to viewport changes, ignored CSS variables and units, and forced designers to specify everything in pixels.
Check out those curves
The shape() function finally brings richer design capabilities to the web. A shape() defines a set of geometric coordinates describing a desired form or trajectory. Unlike path(), which depends on SVG, shape() is built on responsive CSS syntax. When paired with the existing clip‑path property, it has been used to craft ticket stubs, chat bubbles, and other decorative page elements.
The latest addition, the border‑shape property, completes the workflow by applying CSS‑native coordinates from shape() directly to a page’s borders. Define the coordinates with shape(), insert them into a border‑shape declaration, and the outline is established early in the rendering pipeline rather than being clipped near the end.
“In other words, placing borders on CSS shapes will become child’s play!” remarked self‑described CSS hacker Temani Afif in a tutorial on CSS‑Tricks.
This property unlocks design possibilities that were previously too complex to consider within a typical 40‑hour workweek.
Afif’s tutorials showcase numerous demos: you can slice a web page however you like, nest borders inside borders, cut out shapes by filling the space between an outer and inner contour, or craft an open heart inside a square box using pure CSS.
Either the outer border or the inner shape can be animated—allowing the outer edge to morph on hover or the inner area to be filled with an image or another design. Shapes can expand or contract when the mouse passes over them, or text can be highlighted with subtle squiggly lines.
If manually authoring the contents of shape() isn’t preferable, the companion corner‑shape property offers a library of pre‑defined border patterns. Most are variations on the classic box—rounded edges, beveled corners, notches, scoops, and a “squircle” option.
According to caniuse.com, all major browsers now support shape(), while border‑shape and corner‑shape remain experimental (although current releases of Chrome, Edge, and Opera already implement the standard).
Now it is up to developers to forge a more fluid web. ®
Also Read
- Citizen Science App Turns Indian Fishers into Marine Biodiversity Documentarians
- Microsoft Unveils Redesigned Copilot Platform Integrating Chat, Coding, and Automation Tools
- Nothing’s Headphone (1) Pro Targets Studio-Grade Sound With Triple-Driver Architecture
- Perseverance Rover Unearths Ancient Martian Geology in Lac de Charmes Region

