title: How to check if a css rule exists
body: <p>I need to check if a CSS rule exists because I want to issue some warnings if a CSS file is not included.</p>
  
  <p>What is the best way of doing this?</p>
  
  <p>I could filter through <code>window.document.styleSheets.cssRules</code>, but I'm not sure how cross-browser this is (plus I notice on Stack Overflow that object is null for <code>styleSheet[0]</code>).</p>
  
  <p>I would also like to keep dependencies to a minimum.</p>
  
  <p>Is there a straightforward way to do this? Do I just have to create matching elements and test the effects?</p>
  
  <p><strong>Edit:</strong> If not, what are the cross-browser concerns of checking <code>window.document.styleSheets</code>?</p>