Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
postcss-focus
Advanced tools
PostCSS plugin to add :focus selector to every :hover for keyboard accessibility
PostCSS plugin to add :focus
selector to every :hover
for keyboard accessibility.
See also postcss-pseudo-class-enter for more explicit way.
*:focus {
outline: 0;
}
.button:hover {
background: red;
}
*:focus {
outline: 0;
}
.button:hover, .button:focus {
background: red;
}
If there is a :focus
selector, it will be excluded from the processing.
.a:hover, .b:hover {
outline: 0;
}
.b:focus {
background: red;
}
.a:hover, .b:hover, .a:focus {
outline: 0;
}
.b:focus {
background: red;
}
Step 1: Install plugin:
npm install --save-dev postcss postcss-focus
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:
module.exports = {
plugins: [
+ require('postcss-focus'),
require('autoprefixer')
]
}
5.0.1
postcss
to peerDependencies
.:focus
selector already (by Vitalii Rizo).FAQs
PostCSS plugin to add :focus-visible selector to every :hover for keyboard accessibility
We found that postcss-focus 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.