Skip to content

Instantly share code, notes, and snippets.

@Vheissu
Forked from adamschwartz/instant-flat-ui.js
Last active December 27, 2015 17:59
Show Gist options
  • Save Vheissu/7366446 to your computer and use it in GitHub Desktop.
Save Vheissu/7366446 to your computer and use it in GitHub Desktop.
Use documentFragment instead of directly appending element
var f = document.createDocumentFragment();
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>\
';
f.appendChild(d);
document.body.appendChild(f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment