Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
feat: ally plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-lit committed Feb 2, 2021
1 parent aa37a4a commit 92a3ccf
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 4 deletions.
1 change: 1 addition & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {

extends: [
'stylelint-config-standard',
require.resolve('./plugins/a11y.js'),
require.resolve('./plugins/scss.js'),
require.resolve('./plugins/order.js'),
require.resolve('./plugins/prettier.js'),
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"dependencies": {
"stylelint": "^13.9.0",
"stylelint-a11y": "^1.2.3",
"stylelint-config-idiomatic-order": "^8.1.0",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^20.0.0",
Expand Down
11 changes: 11 additions & 0 deletions plugins/a11y.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
plugins: ['stylelint-a11y'],

rules: {
'a11y/media-prefers-reduced-motion': true,
'a11y/no-obsolete-element': true,
'a11y/no-outline-none': true,
'a11y/no-text-align-justify': true,
'a11y/selector-pseudo-class-focus': true,
},
};
30 changes: 26 additions & 4 deletions test/scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@
font-size: 16px;
}

@media screen and (prefers-reduced-motion: reduce) {
.sdf {
animation: none;
}
}

.sdf {
animation-name: skew;

@media screen and (prefers-reduced-motion: reduce) {
animation: none;
}
}

a {
&:hover,
&:focus {
}
}

.ui-button {
@include variables;

Expand Down Expand Up @@ -94,7 +114,8 @@
);
}

&:hover {
&:hover,
&:focus {
color: var(
--ui-button-color--h,
var(--ui-icon-default-background-color)
Expand All @@ -116,8 +137,7 @@
& ::v-deep {
}

&:active,
&:focus {
&:active {
background-color: var(
--ui-button-color--p,
var(--ui-icon-default-background-color)
Expand All @@ -130,12 +150,14 @@
opacity: 0.5;

&:hover,
&:focus,
&:active {
background-color: var(--ui-button-color);
}
}

&:hover {
&:hover,
&:focus {
background-color: var(
--ui-button-color--h,
var(--ui-icon-default-background-color)
Expand Down

0 comments on commit 92a3ccf

Please sign in to comment.