Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding contrast to csss accessibility snippets #45

Merged
merged 4 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
### CSS snippet

- reduced motion - adds a reduced motion snippet with prefix `transition`
- less-contrast - adds less contrast snippet with prefix `less-contrast`
simin4950 marked this conversation as resolved.
Show resolved Hide resolved

### React Aria Snippets

Expand Down
14 changes: 14 additions & 0 deletions snippets/css-snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,19 @@
"}"
],
"description": "Adds reduced motion media query anytime transition is added to css file"
},

"contrast": {
"prefix": [
"less-contrast",
],
"body": [
"less-contrast: \t$1",
simin4950 marked this conversation as resolved.
Show resolved Hide resolved
"@media (prefers-contrast: less) {",
"\t$0",
"}"

],
"description": "Detects if user has requested that the web content is presented with less constrast. Note that this is only supported on Safari."
}
}