Skip to main content
Dublin Library

The Publishing Project

A declarative web?

 

Jeremy Keith recently published [Declarative design](https://adactio.com/journal/18982) on his blog. The premise of the post is that there are two divergent ways to think about web design and building web content, encapsulated by these two opposed statements: **CSS is broken and I want my tools to work around the way CSS has been designed**. and **CSS is awesome and I want my tools to amplify the way that CSS has been designed**. Which of these statements resonates with you will influence the tools that you choose and the comfort you feel when you use tools that don't fit your paradigm. This post will explore the idea of declarative web design and how it can be used to build web content and contrast it with a more imperative design paradigm represented by CSS in JS and Tailwind CSS in particular. ## Where we are now CSS is not easy to learn well. We can write CSS that looks good but it's hard to write CSS that looks good, doesn't break when we make changes to other parts of the stylesheet and performs well at scale. ### One solution: CSS in JS For people who want to "simplify" work with Javascript, the solution may be to use solutions like CSS in JS. CSS in JS uses Javascript to generate CSS that will be inserted into your document, usually in an inline `