🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

postcss-split-css

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-split-css

Split the specified css rules into another file.

1.0.2
latest
Source
npm
Version published
Weekly downloads
15
-71.15%
Maintainers
1
Weekly downloads
 
Created
Source

PostCSS Split CSS

Split the specified css rules into another file.

Installation

npm install postcss-split-css --save-dev

Usage

splitCss = require("postcss-split-css");

postcss([
  splitCss({
    filter: [".lte_ie9", ".ie9", ".ie8"],
    output: {
      from: __dirname + "/src",
      dist: __dirname + "/dist",
      subfix: ".ie",
      append: "#__generated__{content:'" + new Date().toISOString() + "'}"
    }
  })
]);

Before:

/* style.css */
body{
	color: #000;
}
.lte_ie9 div{
	color: #f0f
}
.ie8 div{
	color: #f00
}
div {
    color: #ff0;
}

After:

/* style.css */
body{
	color: #000;
}
div {
    color: #ff0;
}
/* style.ie.css */
.lte_ie9 div{
	color: #f0f
}
.ie8 div{
	color: #f00
}

Inspired by PostCSS Filter Rules

Keywords

postcss

FAQs

Package last updated on 06 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