---
title: "Flatten the Web with This Bookmarklet"
summary: "Flatten the web with this bookmarklet"
date: 2013-11-07
authors: [adam-schwartz]
topics: [Frontend]
canonical: https://product.hubspot.com/blog/flatten-the-web-with-this-bookmarklet
cover:
  scene: flatten-the-web-with-this-bookmarklet
  alt: "A little baker pushes a giant rolling pin across a puffy 2013 web page; behind him the page is pressed flat and its mountains squashed into an orange ridge, while the boxes ahead still bulge."
---

In some ways, a flat UI represents less information than one with depth.  The ultimate extension of this is this quick bookmarklet which can make many websites "flat" just by adding a bit of CSS (skip down for the source):

Drag This To Your Bookmarks Bar

## Some Examples

### GitHub

![Github](/assets/blog/flatten-the-web-with-this-bookmarklet/file-369511754.png)

### Twitter

![Twitter](/assets/blog/flatten-the-web-with-this-bookmarklet/file-374639345.png)

The bookmarklet works in part by removing background images. Websites need to define a good background color behind their images, if they don't, you might see some unexpected things:

### Pandora

![Pandora’s web player flattened by the bookmarklet, with nothing but mustard yellow behind the Norah Jones Radio title.](/assets/blog/flatten-the-web-with-this-bookmarklet/file-374641075.webp)

## Source

```js
var d = document.createElement('div');
d.innerHTML = '\
    <style>\
        *:not(.icon):not(i), *:not(.icon):not(i):after, *:not(.icon):not(i):before {\
            box-shadow: none !important;\
            text-shadow: none !important;\
            background-image: none !important;\
        }\
        *:not(.icon):not(i) {\
            border-color: transparent !important;\
        }\
    </style>\
';
document.body.appendChild(d);
```

Follow [@adamfschwartz](http://twitter.com/adamfschwartz) on Twitter
