Fresh CSS constructs move web design beyond ticky-tacky little boxes
Let us bury the web's 30-year layout reliance on rectangles
The tyranny of box design on the World Wide Web has ended, ushering in a new era of fluid content layout for web designers and AI agents. Published in 1996, the World Wide Web Consortium's initial standard for web page layout restricted sites to grid-defined layouts, as graphics drivers and browser rendering engines were still primitive. However, with modern advancements in technology, web developers can now design web pages beyond square boundaries.
A series of new CSS features, including the shape() function, border-shape, and corner-shape properties, offer designers a broader palette for creating content. These constructs enable web developers to lay out content in a more fluid manner by using responsive CSS syntax and geometric coordinates. Previously, only horizontal or vertical lines or borders could be drawn on a web page with HTML and CSS.
The shape() function, a set of geometric coordinates for desired shapes or trajectories, is built on responsive CSS syntax and can be combined with the clip-path property. This has been used to create various elements such as ticket stubs and chat bubbles. The border-shape property applies CSS-native coordinates defined in shape() to web page borders, allowing for the placement of borders within borders to create cut-outs and animations.
With these new CSS constructs, web developers can now carve up a webpage in any way desired and add borders that change shape as the mouse moves over them or fill them with images or other designs. Corner-shape offers pre-defined fancy border patterns, including boxes with rounded edges, beveled edges, notches, scoops, and even a "squircle."
While the experimental status of border-shape and corner-shape may cause some caution, all major browsers now support shape(). It's up to developers to harness these new tools and build a more fluid web.
Written by urgent.news from The Register's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.