Gathering detailed insights and metrics for postcss-focus-ring
Gathering detailed insights and metrics for postcss-focus-ring
Gathering detailed insights and metrics for postcss-focus-ring
Gathering detailed insights and metrics for postcss-focus-ring
npm install postcss-focus-ring
Typescript
Module System
Min. Node Version
Node Version
NPM Version
72.7
Supply Chain
99.4
Quality
73.9
Maintenance
50
Vulnerability
100
License
CSS (81.02%)
JavaScript (18.98%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
CC0-1.0 License
52 Stars
16 Commits
6 Forks
4 Watchers
3 Branches
8 Contributors
Updated on Sep 18, 2024
Latest Version
1.0.0
Package Id
postcss-focus-ring@1.0.0
Size
5.32 kB
NPM Version
4.2.0
Node Version
7.10.0
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
2
4
PostCSS Focus Ring lets you use the :focus-ring
pseudo-selector in CSS,
following the Selectors Level 4 specification.
1:focus:not(:focus-ring) { 2 outline: none; 3}
Use PostCSS Focus Ring alongside the focus-ring polyfill to swap the pseudo-selector for a class, which maintains the same selector weight.
1:focus:not(.focus-ring) { 2 outline: none; 3}
Additionally, transformed selectors can be exported to a JSON file.
1require('postcss-focus-ring')({ 2 exportAs: 'json' 3});
1[ 2 ".focus-ring", 3 ".x-component-outside .focus-ring", 4 ".focus-ring .x-component-inside", 5]
Or as a JavaScript export:
1require('postcss-focus-ring')({ 2 exportAs: 'js' 3});
1export default [ 2 ".focus-ring", 3 ".x-component-outside .focus-ring", 4 ".focus-ring .x-component-inside", 5];
With these variables synchronized to JavaScript, they can be used alongside the focus-ring polyfill.
Add PostCSS Focus Ring to your build tool:
1npm install postcss-focus-ring --save-dev
Use PostCSS Focus Ring to process your CSS:
1require('postcss-focus-ring').process(YOUR_CSS);
Add PostCSS to your build tool:
1npm install postcss --save-dev
Use PostCSS Focus Ring as a plugin:
1postcss([ 2 require('postcss-focus-ring')() 3]).process(YOUR_CSS);
Add Gulp PostCSS to your build tool:
1npm install gulp-postcss --save-dev
Use PostCSS Focus Ring in your Gulpfile:
1var postcss = require('gulp-postcss'); 2 3gulp.task('css', function () { 4 return gulp.src('./src/*.css').pipe( 5 postcss([ 6 require('postcss-focus-ring')() 7 ]) 8 ).pipe( 9 gulp.dest('.') 10 ); 11});
Add Grunt PostCSS to your build tool:
1npm install grunt-postcss --save-dev
Use PostCSS Focus Ring in your Gruntfile:
1grunt.loadNpmTasks('grunt-postcss'); 2 3grunt.initConfig({ 4 postcss: { 5 options: { 6 use: [ 7 require('postcss-focus-ring')() 8 ] 9 }, 10 dist: { 11 src: '*.css' 12 } 13 } 14});
These options may be passed directly into the plugin.
1require('postcss-focus-ring')({ /* options */ });
exportAs
is used to export transformed selectors originally containing the
:focus-ring
pseudo-selector.
js
string is passed, the selectors will be exported as JavaScript.json
string is passed, the selectors will be exported as JSON.exportTo
is the path to where your JSON or JavaScript will be saved. By
default, it is the CSS source file with an additional focus-ring-selectors
and .js
or .json
extension.
assignTo
is an Array you may push your transformed selectors to. This can
be useful if running the plugin on the client side.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 6/16 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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