Skip to content

Instantly share code, notes, and snippets.

@bonbombs
Forked from growthboot/css-layout-hack.js
Last active July 29, 2021 14:28
Show Gist options
  • Save bonbombs/2f56f82f9681a0492b55731f5b3aa872 to your computer and use it in GitHub Desktop.
Save bonbombs/2f56f82f9681a0492b55731f5b3aa872 to your computer and use it in GitHub Desktop.
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
let domStyle = document.getElementById('domStylee');
if (domStyle) {
document.body.removeChild(domStyle);
return;
}
domStyle = document.createElement("style");
domStyle.setAttribute('id', 'domStylee');
domStyle.append(
['* { color:#88218a!important;outline:solid #6e3c6f 1px!important; background-color: rgba(255,0,0,.1) !important; }'],
['* * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * * * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * * * * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * * * * * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * * * * * * { background-color: rgba(109, 116, 199, .1) !important; }'],
['* * * * * * * * * { background-color: rgba(109, 116, 199, .1) !important; }'].join()
);
document.body.appendChild(domStyle);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment