Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-focus

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-focus - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 1.0
* Use PostCSS 5.0 API.
* Do not add spaces for compressed styles.
## 0.1.1

@@ -2,0 +6,0 @@ * Support PostCSS Plugin Guidelines.

4

index.js

@@ -5,3 +5,3 @@ var postcss = require('postcss');

return function (css) {
css.eachRule(function (rule) {
css.walkRules(function (rule) {
if ( rule.selector.indexOf(':hover') !== -1 ) {

@@ -15,3 +15,3 @@ var focuses = [];

if ( focuses.length ) {
rule.selector = rule.selector + ', ' + focuses.join(', ');
rule.selectors = rule.selectors.concat(focuses);
}

@@ -18,0 +18,0 @@ }

{
"name": "postcss-focus",
"version": "0.1.1",
"description": "PostCSS plugin to add :focus selector to every :hover",
"keywords": ["postcss", "css", "postcss-plugin", "hover", "focus", "a11y"],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/postcss/postcss-focus.git"
},
"dependencies": {
"postcss": "^4.1.8"
},
"devDependencies": {
"gulp-eslint": "0.11.1",
"gulp-mocha": "2.0.1",
"mocha": "2.2.4",
"chai": "2.3.0",
"gulp": "3.8.11"
},
"scripts": {
"test": "gulp"
}
"name": "postcss-focus",
"version": "1.0.0",
"description": "PostCSS plugin to add :focus selector to every :hover",
"keywords": [
"postcss",
"css",
"postcss-plugin",
"hover",
"focus",
"a11y"
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/postcss/postcss-focus.git"
},
"dependencies": {
"postcss": "^5.0.2"
},
"devDependencies": {
"gulp-eslint": "1.0.0",
"gulp-mocha": "2.1.3",
"mocha": "2.2.5",
"chai": "3.2.0",
"gulp": "3.9.0"
},
"scripts": {
"test": "gulp"
}
}

@@ -9,7 +9,13 @@ # PostCSS Focus [![Build Status][ci-img]][ci]

[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/postcss/postcss-focus.svg
[ci]: https://travis-ci.org/postcss/postcss-focus
See also [postcss-pseudo-class-enter] for more explicit way.
[postcss-pseudo-class-enter]: https://github.com/jonathantneal/postcss-pseudo-class-enter
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/postcss/postcss-focus.svg
[ci]: https://travis-ci.org/postcss/postcss-focus
```css
*:focus {
outline: 0;
}
.button:hover {

@@ -21,2 +27,5 @@ background: red;

```css
*:focus {
outline: 0;
}
.button:hover, .button:focus {

@@ -23,0 +32,0 @@ background: red;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc