title: Prefix css selectors for make styles from API safe
body: <p>Let's assume that the user can add styles for every component in admin panel and I get it as string in my Node server:</p>
  
  <pre><code>const stylesFromAPI = ".p { color: red } .bg { background: lime }";
  </code></pre>
  
  <p>How to prefix this styles before append to my document to avoid conflicts?
  I need something like CSS modules but working with strings (not as module loader):</p>
  
  <pre><code>const stylesFromAPI = css(".p { color: red } .bg { background: lime }"); // returns hashedClassname685946898456
  &lt;SomeCompontent className={stylesFromAPI} /&gt;
  </code></pre>
  
  <p>produces:</p>
  
  <pre><code>&lt;style&gt;
    .hashedClassname685946898456 .p { color: red }
    .hashedClassname685946898456 .bg { background: lime }
  &lt;/style&gt;
  &lt;div class="hashedClassname685946898456"&gt;&lt;/div&gt;
  </code></pre>