Socket
Book a DemoInstallSign in
Socket

postcss-plugin-namespace

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-plugin-namespace

A PostCSS plugin that could add css selector before all selectors,so that the styles will not affect other projects.

0.0.1
Source
npmnpm
Version published
Weekly downloads
793
6.87%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS Plugin Namespace Build Status

PostCSS A PostCSS plugin that could add css selector before all selectors,so that the styles will not affect other projects.

Usage

passed a css selector as the first argument;

postcss([ require('postcss-plugin-namespace')('.insert-selector') ])

input

.foo {
    /* Input example */
}

output

.insert-selector .foo {
  /* Output example */
}

Options

Pass an options object as the second argument.

options.ignore

Don't prefix specific classes or classes that match a regex.

var css = postcss([namespace('.test', { ignore: [ /body/, ".icon" ] })])
  .process(inputCSS)
  .then(results => {results.toString()});

See PostCSS docs for examples for your environment.

Keywords

postcss

FAQs

Package last updated on 08 Jan 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.