• Stars
    star
    261
  • Rank 156,630 (Top 4 %)
  • Language
    CSS
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A small set of global rules to make things accessible and reset default styling

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.

This project is available on npm and unpkg so things should be fast as well as versioned! For more info about versioning, read the 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;

<!DOCTYPE html>
<html>
  <head>
    <title>Hey y'all</title>
    <link rel="stylesheet" href="https://unpkg.com/a11y-css-reset/a11y.css" />
    <link rel="stylesheet" href="main.css" />
  </head>
  <body>
    <h1>Hi 👋</h1>
  </body>
</html>
@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;

<!DOCTYPE html>
<html>
  <head>
    <title>Hey y'all</title>
    <link rel="stylesheet" href="https://unpkg.com/a11y-css-reset/reset.css" />
    <link rel="stylesheet" href="main.css" />
  </head>
  <body>
    <h1>Hi 👋</h1>
  </body>
</html>
@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;

<!DOCTYPE html>
<html>
  <head>
    <title>Hey y'all</title>
    <link rel="stylesheet" href="https://unpkg.com/a11y-css-reset/combo.css" />
    <link rel="stylesheet" href="main.css" />
  </head>
  <body>
    <h1>Hi 👋</h1>
  </body>
</html>
@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.

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. 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

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Mike Engel
Mike Engel

💬 🐛 💻 👀 🚧 🚇 💡 📖 🤔
Luke Ehler
Luke Ehler

💻
Quinten Powell
Quinten Powell

📖
toastal
toastal

💻
Mikhail Novikov
Mikhail Novikov

💻
offirmo
offirmo

🤔 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

More Repositories

1

jwt-cli

A super fast CLI tool to decode and encode JWTs built in Rust
Rust
1,066
star
2

styled-typography

Typograpy components for react and styled-components
TypeScript
128
star
3

swiftvg

Convert SVG path data to a Swift 3 UIBezierPath
JavaScript
109
star
4

babel-plugin-bucklescript

Write ReasonML and Bucklescript in your existing babel projects
JavaScript
77
star
5

bkmrkd

Bkmrkd is a self-hosted, lightweight bookmarking service run on node.js and rethinkdb
JavaScript
51
star
6

Barnacal

A simple menu bar app for viewing a calendar
JavaScript
37
star
7

floating-label-react

A floating-label component using react without any dependencies
CSS
26
star
8

preact-cli-typescript-sample

An example of how to use typescript with preact-cli and all its goodies
TypeScript
17
star
9

gistcard

Show better gist previews in twitter with a code snippet and a link to the gist
TypeScript
13
star
10

accept-language-rs

A tiny library for parsing the Accept-Language header from browsers
Rust
12
star
11

now-importer

Easily import your static websites into ZEIT's now platform
Rust
8
star
12

locale

A polyfill to understand your users' preferred languages
Rust
7
star
13

homebrew-jwt-cli

The official homebrew tap for jwt-cli. Because it's not popular enough on its own.
Ruby
5
star
14

hyper-base16-ocean-dark

A Base 16 Ocean Hypeterm theme plugin
JavaScript
4
star
15

split-view-test

Test case for odd split view behavior in SwiftUI
Swift
2
star
16

gotham-router-composition

A small example demonstrating one way to compose a router in gotham
Rust
1
star
17

vimfiles

My .vim directory and .vimrc
Vim Script
1
star
18

mike-engel.com

source for mike-engel.com
SCSS
1
star
19

passablewords-js

A password validation library which checks a password against a million of the most common as well as it's ability to be cracked
JavaScript
1
star
20

vscode-simple-ocean

A minimal syntax theme based off of Base16 Ocean for VS Code
1
star
21

atom-simple-base16-ocean

A simplified base16 ocean theme. 4 colors and that's it.
CSS
1
star