projectwallace/extract-css-core

Report where styles come from

bartveneman opened this issue · 1 comments

Sometimes it's pretty interesting to know where styles may have come from. Some possible options:

  • <link rel="stylesheet"> in HTML
  • <link rel="stylesheet"> generated by JS
  • <style> in HTML
  • <style> generated by JS
  • <div style=""> in HTML
  • <div style=""> generated by JS
  • element.style.color = 'red' in JS
  • myStyle.insertRule('#blanc { color: white }', 0); CSSStyleSheet.insertRule()
  • @import rules for most of the above mentioned cases

Prior art

  • get-css does this, but not for JS-generated CSS, I think

Fixed in 0e93480