Socket
Socket
Sign inDemoInstall

@emotion/sheet

Package Overview
Dependencies
0
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @emotion/sheet

emotion's stylesheet


Version published
Weekly downloads
9.6M
decreased by-6.01%
Maintainers
2
Created
Weekly downloads
 

Package description

What is @emotion/sheet?

The @emotion/sheet package is part of the Emotion library, which is a popular CSS-in-JS library that allows developers to write CSS styles with JavaScript. The @emotion/sheet package provides a low-level utility for managing style sheets. It is used internally by Emotion to insert styles into the DOM, but it can also be used directly for more control over how styles are inserted.

What are @emotion/sheet's main functionalities?

Creating and inserting a style sheet

This feature allows you to create a new style sheet and insert CSS rules into it. The 'speedy' option enables faster insertion of rules by using CSSOM APIs.

{"import { StyleSheet } from '@emotion/sheet';\nconst sheet = new StyleSheet({ speedy: true });\nsheet.insert('.css-12345 { color: hotpink; }');"}

Flushing styles

This feature allows you to remove all rules from the style sheet. This can be useful for cleaning up styles in server-side rendering or during hot module replacement in development.

{"import { StyleSheet } from '@emotion/sheet';\nconst sheet = new StyleSheet({ speedy: true });\nsheet.insert('.css-12345 { color: hotpink; }');\nsheet.flush();"}

Other packages similar to @emotion/sheet

FAQs

Last updated on 09 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc