> <i>How do we get the DOM? The browser knows how to create it from an HTTP request consisting of a URL, some headers, and some HTML.</i><p>I would already call this bit into question. At least originally, the "document" was <i>only</i> the HTML part. The task of HTTP was to shuffle the document around, not itself be part of the document.<p>In practice today, most documents have a HTTP request attached to it, but you can still see the issues if you try to load HTML from a file or from cache. What is the corresponding HTTP request for that?<p>I sort of can see the appeal of styling by URL, but that too seems in danger if opening a huge can of worms. Suddenly, you can't test styles locally anymore, because the domain name now influences the selectors. Also, if you move domains and forget to update your styles, suddenly your site will be broken.<p>> <i>Setting aside the open-ended possibilities people might dream up with non-standard X- headers</i><p>What possibilities would that enable that couldn't also be done using data-* attributes?<p>> <i>imagine being able declare some styles based on the presence of a cookie</i><p>Ok, that might be a useful idea after all.