https://github.com/calebdwilliams/postcss-plugin-reference-selectors
PostCSS plugin for reference selectors
https://github.com/calebdwilliams/postcss-plugin-reference-selectors
Last synced: 24 days ago
JSON representation
PostCSS plugin for reference selectors
- Host: GitHub
- URL: https://github.com/calebdwilliams/postcss-plugin-reference-selectors
- Owner: calebdwilliams
- License: mit
- Created: 2022-05-09T01:11:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-09T01:13:39.000Z (almost 3 years ago)
- Last Synced: 2024-05-27T12:34:11.210Z (11 months ago)
- Language: JavaScript
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-reference-selectors
[PostCSS] plugin reference-selectors.
[PostCSS]: https://github.com/postcss/postcss
```css
.foo {
/* Input example */
}
``````css
.foo {
/* Output example */
}
```## Usage
**Step 1:** Install plugin:
```sh
npm install --save-dev postcss postcss-reference-selectors
```**Step 2:** Check you project for existed PostCSS config: `postcss.config.js`
in the project root, `"postcss"` section in `package.json`
or `postcss` in bundle config.If you do not use PostCSS, add it according to [official docs]
and set this plugin in settings.**Step 3:** Add the plugin to plugins list:
```diff
module.exports = {
plugins: [
+ require('postcss-reference-selectors'),
require('autoprefixer')
]
}
```[official docs]: https://github.com/postcss/postcss#usage