Gathering detailed insights and metrics for @outstand/postcss-extend-rule
Gathering detailed insights and metrics for @outstand/postcss-extend-rule
Gathering detailed insights and metrics for @outstand/postcss-extend-rule
Gathering detailed insights and metrics for @outstand/postcss-extend-rule
Use the extend at-rule and functional selectors in CSS
npm install @outstand/postcss-extend-rule
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (57.66%)
CSS (42.34%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
CC0-1.0 License
53 Stars
30 Commits
7 Forks
4 Watchers
3 Branches
8 Contributors
Updated on Jul 10, 2025
Latest Version
4.1.2
Package Id
@outstand/postcss-extend-rule@4.1.2
Unpacked Size
25.53 kB
Size
7.04 kB
File Count
6
NPM Version
8.11.0
Node Version
16.15.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
PostCSS Extend Rule lets you use the @extend
at-rule and
Functional Selectors in CSS, following the speculative
CSS Extend Rules Specification.
1%thick-border { 2 border: thick dotted red; 3} 4 5.serious-modal { 6 font-style: normal; 7 font-weight: bold; 8 9 @media (max-width: 240px) { 10 @extend .modal:hover; 11 } 12} 13 14.modal { 15 @extend %thick-border; 16 17 color: red; 18} 19 20.modal:hover:not(:focus) { 21 outline: none; 22} 23 24/* becomes */ 25 26.serious-modal { 27 font-style: normal; 28 font-weight: bold; 29} 30 31@media (max-width: 240px) { 32 .serious-modal:not(:focus) { 33 outline: none; 34 } 35} 36 37.modal { 38 border: thick dotted red; 39 color: red; 40} 41 42.modal:hover:not(:focus) { 43 outline: none; 44}
Add PostCSS Extend Rule to your project:
1npm install postcss postcss-extend-rule --save-dev
Use PostCSS Extend Rule to process your CSS:
1const postcssExtendRule = require('postcss-extend-rule'); 2 3postcssExtendRule.process(YOUR_CSS /*, processOptions, pluginOptions */);
Or use it as a PostCSS plugin:
1const postcss = require('postcss'); 2const postcssExtendRule = require('postcss-extend-rule'); 3 4postcss([ 5 postcssExtendRule(/* pluginOptions */) 6]).process(YOUR_CSS /*, processOptions */);
PostCSS Extend Rule runs in all Node environments, with special instructions for:
Node | PostCSS CLI | Webpack | Create React App | Gulp | Grunt |
---|
The name
option determines the at-rule name being used to extend selectors.
By default, this name is extend
, meaning @extend
rules are parsed.
1postcssExtend({ name: 'postcss-extend' })
If the name
option were changed to, say, postcss-extend
, then only
@postcss-extend
at-rules would be parsed.
1main { 2 @postcss-extend .some-rule; 3}
The onFunctionalSelector
option determines how functional selectors should be
handled. Its options are:
remove
(default) removes any functional selectorignore
ignores any functional selector and moves onwarn
warns the user whenever it encounters a functional selectorthrow
throws an error if ever it encounters a functional selector1postcssExtend({ onFunctionalSelector: 'remove' /* default */ })
1%this-will-be-removed {}
The onRecursiveExtend
option determines how recursive extend at-rules should
be handled. Its options are:
remove
(default) removes any recursive extend at-rulesignore
ignores any recursive extend at-rules and moves onwarn
warns the user whenever it encounters a recursive extend at-rulesthrow
throws an error if ever it encounters a recursive extend at-rules1postcssExtend({ onRecursiveExtend: 'remove' /* default */ })
1.this-will-not-extend-itself { 2 @extend .this-will-not-extend-itself; 3}
The onUnusedExtend
option determines how an unused extend at-rule should be
handled. Its options are:
remove
(default) removes any unused extend at-ruleignore
ignores any unused extend at-rule and moves onwarn
warns the user whenever it encounters an unused extend at-rulethrow
throws an error if ever it encounters an unused extend at-rule1postcssExtend({ onUnusedExtend: 'remove' /* default */ })
1main { 2 @extend .this-selector-does-not-exist-and-will-be-removed; 3}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 2/29 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More