Skip to content

Instantly share code, notes, and snippets.

@christiantakle
Created August 8, 2014 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiantakle/ec48ffc33cf013a54afb to your computer and use it in GitHub Desktop.
Save christiantakle/ec48ffc33cf013a54afb to your computer and use it in GitHub Desktop.
@floydophone What is the style workflow @ instagram I see no styling loading in the network tab - but you're using class' in the markup.
// In chrome dev-console
[].splice
.call(document.styleSheets,0)
.map(function(x){ return x.href })
// => [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
@christiantakle
Copy link
Author

I wonder if you're doing something similar to:

var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.cssClass { color: #F00; }';
document.getElementsByTagName('head')[0].appendChild(style);

or
http://davidwalsh.name/add-rules-stylesheets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment