stylelint-a11y
Advanced tools
Comparing version 1.1.9 to 1.1.10
@@ -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; } }', |
@@ -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 { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
324326
2981