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

stylelint-a11y

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-a11y - npm Package Compare versions

Comparing version 1.1.9 to 1.1.10

20

dist/rules/media-prefers-reduced-motion/__tests__/index.js

@@ -17,2 +17,4 @@ 'use strict';

}, {
code: 'div { transition: none; }'
}, {
code: '.foo { transition: none } @media screen and (prefers-reduced-motion: reduce) { .foo { transition: none } }'

@@ -38,20 +40,2 @@ }, {

}, {
code: '.foo { transition: none; }',
fixed: '@media screen and (prefers-reduced-motion: reduce) {\n.foo { transition: none;\n}\n}\n.foo { transition: none; }',
message: _index.messages.expected('.foo'),
line: 1,
column: 4
}, {
code: '.bar { animation: none; } .baz { transition: none; } @media screen and (prefers-reduced-motion) { .baz { transition: none; } }',
fixed: '@media screen and (prefers-reduced-motion: reduce) {\n.bar { animation: none;\n}\n} .bar { animation: none; } .baz { transition: none; } @media screen and (prefers-reduced-motion) { .baz { transition: none; } }',
message: _index.messages.expected('.bar'),
line: 1,
column: 4
}, {
code: '.foo { animation: none; } @media screen and (prefers-reduced-motion) { .foo { transition: none; } }',
fixed: '@media screen and (prefers-reduced-motion: reduce) {\n.foo { animation: none;\n}\n} .foo { animation: none; } @media screen and (prefers-reduced-motion) { .foo { transition: none; } }',
message: _index.messages.expected('.foo'),
line: 1,
column: 4
}, {
code: '.foo { animation: 1s ease-in; } @media screen and (prefers-reduced-motion) { .foo { animation: 1s ease-in; } }',

@@ -58,0 +42,0 @@ fixed: '@media screen and (prefers-reduced-motion: reduce) {\n.foo { animation: none;\n}\n} .foo { animation: 1s ease-in; } @media screen and (prefers-reduced-motion) { .foo { animation: 1s ease-in; } }',

3

dist/rules/media-prefers-reduced-motion/index.js

@@ -130,2 +130,5 @@ 'use strict';

currentSelector = targetProperties[index];
if (targetProperties.indexOf(declaration.prop) >= 0 && declaration.value === 'none') {
return false;
}

@@ -132,0 +135,0 @@ return index >= 0 && noMatchedParams;

{
"name": "stylelint-a11y",
"version": "1.1.9",
"version": "1.1.10",
"description": "Plugin for stylelint with a11y rules",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -13,2 +13,5 @@ import rule, { messages, ruleName } from '../index';

{
code: 'div { transition: none; }',
},
{
code:

@@ -46,29 +49,3 @@ '.foo { transition: none } @media screen and (prefers-reduced-motion: reduce) { .foo { transition: none } }',

{
code: '.foo { transition: none; }',
fixed:
'@media screen and (prefers-reduced-motion: reduce) {\n.foo { transition: none;\n}\n}\n.foo { transition: none; }',
message: messages.expected('.foo'),
line: 1,
column: 4,
},
{
code:
'.bar { animation: none; } .baz { transition: none; } @media screen and (prefers-reduced-motion) { .baz { transition: none; } }',
fixed:
'@media screen and (prefers-reduced-motion: reduce) {\n.bar { animation: none;\n}\n} .bar { animation: none; } .baz { transition: none; } @media screen and (prefers-reduced-motion) { .baz { transition: none; } }',
message: messages.expected('.bar'),
line: 1,
column: 4,
},
{
code:
'.foo { animation: none; } @media screen and (prefers-reduced-motion) { .foo { transition: none; } }',
fixed:
'@media screen and (prefers-reduced-motion: reduce) {\n.foo { animation: none;\n}\n} .foo { animation: none; } @media screen and (prefers-reduced-motion) { .foo { transition: none; } }',
message: messages.expected('.foo'),
line: 1,
column: 4,
},
{
code:
'.foo { animation: 1s ease-in; } @media screen and (prefers-reduced-motion) { .foo { animation: 1s ease-in; } }',

@@ -75,0 +52,0 @@ fixed:

@@ -36,2 +36,5 @@ import { utils } from 'stylelint';

currentSelector = targetProperties[index];
if (targetProperties.indexOf(declaration.prop) >= 0 && declaration.value === 'none') {
return false;
}

@@ -38,0 +41,0 @@ return index >= 0 && noMatchedParams;

@@ -17,3 +17,3 @@ # media-prefers-reduced-motion

.foo {
transition: none;
animation: 1s ease-in;
}

@@ -24,9 +24,6 @@ ```

.bar {
animation: none;
animation-name: skew;
}
.baz {
transition: none;
}
@media screen and (prefers-reduced-motion) {
.baz {
.bar {
transition: none;

@@ -37,15 +34,10 @@ }

The following patterns are _not_ considered violations:
```css
.foo {
animation: none;
div {
transition: none;
}
@media screen and (prefers-reduced-motion) {
.foo {
transition: none;
}
}
```
The following patterns are _not_ considered violations:
```css

@@ -52,0 +44,0 @@ .foo {

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