Skip to content

Instantly share code, notes, and snippets.

View guanghechen's full-sized avatar
💭
I may be slow to respond.

guanghechen guanghechen

💭
I may be slow to respond.
View GitHub Profile
  • Get all styles.

    [...document.querySelectorAll('[data-emotion]')]
      .flatMap(({ sheet }) => [...sheet.cssRules].map(rules => rules.cssText))
      .join('\n')

See emotion-js/emotion#1248 (comment)