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

css-namespace

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-namespace

This utility takes a css file (input) and prefixes (namespaces) the css rules with a predefined selector

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

CSS Namespace

This utility takes a css file (input) and prefixes (namespaces) the css rules with a predefined selector.

Why

I needed to add a selector to every single rule in a large CSS file post build. I couldn't find anything that did what I needed, so I built it!

Running

You can run this by either installing this package as a dev dependency or by using npx.

Install as a dev dependency

npm install --save-dev css-namespace

You can then add a script to your package.json file to run the utility.

{
    "scripts": {
        "build-css": "css-namespace -i ./src/styles.css -s #app -w"
    }
}

Using npx

npx css-container -i ./src/styles.css -s #app -w

Command Line Args

ArgumentAliasTypeDefault ValueDescription
verbosevBooleanfalseEnable verbose mode for detailed output.
inputiStringSpecify the input file or data source.
selectorsStringDefine a selector for filtering data.
outputoString'./output.css'Specify the output file or destination.
overwritewBooleanfalseOverwrite the original css file (output is ignored)
prettyBooleanfalseEnable pretty formatting for the output data.

FAQs

Package last updated on 02 Sep 2023

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