First Houdini APIs for CSS layout debut

The W3C effort is meant to give developers more control over how a web page looks

First Houdini APIs for CSS layout debut
Getty Images

Houdini, a CSS (cascading style sheets) standards effort at the World Wide Web Consortium to give developers more control over how a web page looks, now has its first APIs available.

Four high-level APIs are part of Houdini: for the parser, layout, painting, and animation worklet, representing major stages of the rendering pipeline. The animation worklet API will be available in beta in the planned Chrome 71 browser.

There also are lower-level APIs, such as font metrics, worklets, and an API for properties and values. Worklets act as a Swiss Army knife of sorts, serving as isolated JavaScript code to help with performance, attaching to event loops.

The main goal for Houdini is to expose hooks into the major stages of the layout phase, including style, layout, paint, and composite phases. Houdini exposes parts of the CSS engine that make possible APIs such as such as CSS Grid and conic gradients. Using Houdini, developers should be able to teach CSS how to draw their preferred look on a page. Developers also should be able to write better polyfills.

The project has posted a chart tracking the progress of Houdini and its level of support in various browsers.