Sometimes you get an idea in your head and you just need to follow through. With all the talk about revisiting wp-admin color schemes, I wondered… could I remove all the colors from all the stylesheets? What would that look like?
I already had a tool parsing out stylesheets to count colors, so I went to repurpose that. I ended up creating a postcss plugin that, when run on a CSS file, removes any declaration with a color value. The exception to this are border* & outline, which are split up into their longhand values first, to try to preserve as much structure as possible.
The end result:
Everything has a transparent background, showing the white browser background. The text is all black, except for blue & purple links. Widgets still have their outlines, so it ends up looking more like a high-def wireframe than a real website.
Again, everything’s using browser defaults. You can see what’s meant to be the current menu item ◀ is just a big black square, since it uses mix of transparent + color borders to create that effect. The plugin modal is almost okay— it’s an iframe, so it gets a default-white background, and the modal script injects the black overlay. This view really showed me how much color plays into how I scan a notice. Regardless, it holds up surprisingly well.
Media library.
But when we try to open the media library, things are wonky. With no background color, the Attachment Details modal is unusable. So maybe a reset by way of removing all colors isn’t a great idea, sometimes the colors are “structural”.
Admin bar on the front end of the site
I almost like this transparent admin bar. It’s inheriting the theme styles, which is why the links are black here. The lack of background color does make it hard to read, though.
If you want to try this out on your own CSS, here’s the plugin I wrote. You can run it directly by adding it to postcss.config.js like so, then running postcss however you usually do (I used postcss-cli for this).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No comments.