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

postcss-scopeit

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-scopeit

PostCSS plugin for adding a global scope to all selectors in the specified input

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

postcss-scopeit

This is a PostCSS plugin to add additional specificity to your specified CSS. The plugin accepts a scope name and uses that to add the additional specificity. The scope name is assumed to be attached to body tag.

For e.g.

body * {
  color: red;
}

button.primary {
  color: blue;
  border: 1px solid black;
}

Running through this plugin with scope name of 'test' will alter it to be:

body.test * {
  color: red;
}

.test button.primary {
  color: blue;
  border: 1px solid black;
}

This is typically helpful when components are developed by external parties for your web application. This can avoid style bleed between the component and its parent.

What does it do ?

  1. Reads through every selector and appends the scopeName you provide to it like the example above.
  2. It appends "body" selectors with the scopeName.
  3. It ignores @keyframes.

Keywords

FAQs

Package last updated on 07 Aug 2017

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