Skip to main content

GSS - Layouts Not Possible Even with Tomorrow's CSS Using Polyfills from the Future

Dan Tocchini (The Grid)
HTML5, CSS3, and Browser Tech
Location: Salon 5/6
Slides:   1-PDF 

Web developers are expected to build increasingly sophisticated UIs faster, cheaper, with tools that have not evolved with the times. Why is the trivial task of centering an element with CSS so obtusely complex ? CSS layout primitives are not expressive enough – it doesn’t really matter that some div is 720px wide – what matters is how it relates to other elements in the layout. WTF, why can’t we position & size elements relative to each other, not just relative to their positioned parents? For more than a decade, web developers have been asking for this, but the W3C has refused to tackle the engineering problems with the “cyclic dependencies” that naturally arise in relative layout logic. Sounds like a classic Constraint Satisfaction Problem – JavaScript to the rescue!

Let’s get down and dirty with Grid Style Sheets (GSS), a new preprocessor & runtime that replaces the browser’s layout engine with one that harnesses the Cassowary Constraint Solver — the same algorithm Apple uses to compute native layout.

Photo of Dan Tocchini

Dan Tocchini

The Grid

Creator of [GSS](, founder of the stealth mode upstart behind [Flowhub]( & [NoFlo](