https://github.com/eriklharper/postcss-nested-import
@import stylesheets inside nested CSS
https://github.com/eriklharper/postcss-nested-import
postcss
Last synced: about 1 year ago
JSON representation
@import stylesheets inside nested CSS
- Host: GitHub
- URL: https://github.com/eriklharper/postcss-nested-import
- Owner: eriklharper
- License: mit
- Created: 2017-04-18T00:08:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-06T06:00:43.000Z (almost 3 years ago)
- Last Synced: 2025-05-30T08:53:27.689Z (about 1 year ago)
- Topics: postcss
- Language: JavaScript
- Homepage:
- Size: 227 KB
- Stars: 18
- Watchers: 1
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
PostCSS Nested Import
PostCSS plugin for importing other stylesheet source files anywhere in your CSS.
Before:
```css
/* vendor.css */
.vendor {
background: silver;
}
/* index.css */
:global {
@nested-import './vendor.css';
}
```
After:
```css
:global {
.vendor {
background: silver;
}
}
```
## Usage
```js
postcss([require("postcss-nested-import")]);
```
See [PostCSS](https://github.com/postcss/postcss) docs for examples for your environment.