
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@density/nicss
Advanced tools
(pronounced like nice)
Nicss is a css helper library that extracts exported stylesheets out of node_modules and symlinks them
into a single styles/ folder. This makes it easier to include the stylesheets of dependencies with css
post-processors.
As an unofficial standard, many popular packages are adding a style field to their package.json
file that links to their
compiled css. Nicss crawls through your dependency graph and finds packages with this style
property and symlinks each compiled css file to a single styles/ folder.
Here's an example project:
.
├── node_modules
│ ├── one
│ │ ├── package.json // contains `"style": "./one-styles.css"`
│ │ └── one-styles.css // contains `.one { color: red; }`
│ └── two
│ ├── package.json // contains `"style": "./two-styles.css"`
│ └── two-styles.css // contains `.two { color: blue; }`
├── index.js
└── package.json
When you run nicss, this is what happens:
.
├── node_modules
│ ├── one
│ │ ├── package.json // contains `"style": "./one-styles.css"`
│ │ └── one-styles.css // contains `.one { color: red; }`
│ └── two
│ ├── package.json // contains `"style": "./two-styles.css"`
│ └── two-styles.css // contains `.two { color: blue; }`
├── index.js
├── package.json
└── styles // nicss creates this folder...
├── one.css -> ../node_modules/one/one-styles.css // ... and symlinks each package's stylesheet inside.
└── two.css -> ../node_modules/two/two-styles.css
Now, any package's defined stylesheet is accessible from within one folder:
$ # ie, cat styles/$PACKAGENAME.css
$ cat styles/one.css
.one { color: red; }
$ cat styles/two.css
.one { color: two; }
This is a format that tools like node-sass (using includePaths) and less (using paths) can
easily consume:
// node-sass
// Note: run `nicss --ext scss` to output scss instead of css files for the below to work.
const sass = require('node-sass');
sass.render({
data: '@import "one";',
includePaths: ['./styles'],
}, function(err, output) {
console.log(err, output)
});
// less
const less = require('less');
less.render('@import "one.css";', {
paths: ['./styles']
}, function (e, output) {
console.log(err, output);
});
npm i -S @density/nicss./node_modules/.bin/nicsspostinstall hook to your package, so that after running npm install, css dependencies
are linked for you: "postinstall": "nicss"npm install.Webpack is magic. Magic can be great when it works, but can be confusing and complicated. We've opted to minimize our use of webpack so that we have a deep understanding of our build process.
FAQs
(pronounced like `nice`)
The npm package @density/nicss receives a total of 0 weekly downloads. As such, @density/nicss popularity was classified as not popular.
We found that @density/nicss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.