Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mike-engel/a11y-css-reset
A small set of global rules to make things accessible and reset default styling
https://github.com/mike-engel/a11y-css-reset
a11y accessibility css reset reset-css
Last synced: 4 days ago
JSON representation
A small set of global rules to make things accessible and reset default styling
- Host: GitHub
- URL: https://github.com/mike-engel/a11y-css-reset
- Owner: mike-engel
- License: mit
- Created: 2019-06-20T19:39:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T09:01:29.000Z (over 2 years ago)
- Last Synced: 2024-10-27T23:21:22.754Z (17 days ago)
- Topics: a11y, accessibility, css, reset, reset-css
- Language: CSS
- Size: 40 KB
- Stars: 263
- Watchers: 9
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# a11y-css-reset
> Global CSS rules to improve accessibility in your site and make your life easier
Included are three stylesheets you can include in your sites. One is strictly best practice CSS rules for accessibility, and another is what I consider to be best practices for starting development. The third combines them into a single stylesheet. These are meant to be used with the CSS [`@import` at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/@import).
This project is available on npm and [unpkg](https://unpkg.com/) so things should be fast as well as versioned! For more info about versioning, read the [examples](https://unpkg.com/#examples) section of unpkg's website.
## Usage
### accessibility only
If you just want some CSS rules focused on accessibility, include the `a11y` stylesheet _before_ any other CSS rules you write. You can see the current ruleset deployed by opening the url for [a11y.css](https://unpkg.com/a11y-css-reset/a11y.css);
```html
Hey y'all
Hi 👋
```
```css
@import url("https://unpkg.com/a11y-css-reset/a11y.css");/* more rules here! */
ul {
list-style-type: disc;
}
```### reset only
If you just want some CSS rules focused on providing a better out-of-the-box dev experience, include the `reset` stylesheet _before_ any other CSS rules you write. You can see the current ruleset deployed by opening the url for [reset.css](https://unpkg.com/a11y-css-reset/reset.css);
```html
Hey y'all
Hi 👋
```
```css
@import url("https://unpkg.com/a11y-css-reset/reset.css");/* more rules here! */
ul {
list-style-type: disc;
}
```### the combo
If you just both the `reset` and `a11y` stylesheets, include the `combo` stylesheet _before_ any other CSS rules you write. You can see the current ruleset deployed by opening the url for [combo.css](https://unpkg.com/a11y-css-reset/combo.css);
```html
Hey y'all
Hi 👋
```
```css
@import url("https://unpkg.com/a11y-css-reset/combo.css");/* more rules here! */
ul {
list-style-type: disc;
}
```### Via JS
If you are able to include CSS from within your javascript files through something like webpack, this project is also available from npm. Unlike the CSS at-rule, this does _not_ need to come before any other rules. It should be near the top due to the cascading nature of CSS, however.
```js
import "~a11y-css-reset/a11y.css";
import "~a11y-css-reset/reset.css";
import "~a11y-css-reset/combo.css";
```## Contributing
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
Issues and pull requests are welcome!.
This project is pure CSS—no preprocessing, no development environment to setup, nada! Just plain ol' CSS.
## [License](LICENSE.md)
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Mike Engel
💬 🐛 💻 👀 🚧 🚇 💡 📖 🤔
Luke Ehler
💻
Quinten Powell
📖
toastal
💻
Mikhail Novikov
💻
offirmo
🤔 💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!