Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@emotion/sheet

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/sheet

emotion's stylesheet

  • 0.6.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9M
decreased by-53.68%
Maintainers
2
Weekly downloads
 
Created

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

Package last updated on 07 Apr 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc