cssremedy-mod
Version:
Start your project with a remedy for the technical debt of CSS. A fork of Jen Simmons' CSS Remedy with 0 specificity.
105 lines (81 loc) • 2.44 kB
CSS
/* @docs
label: Reminders
version: 0.1.0-beta.2
note: |
All the remedies in this file are commented out by default,
because they could cause harm as general defaults.
These should be used as reminders
to handle common styling issues
in a way that will work for your project and users.
Read, explore, uncomment, and edit as needed.
category: file
*/
/* @docs
label: List Style
note: |
List styling is not usually desired in navigation,
but this also removes list-semantics for screen-readers
links:
- https://github.com/mozdevs/cssremedy/issues/15
category: navigation
*/
/* nav ul {
list-style: none;
} */
/* @docs
label: List Voiceover
note: |
1. Add zero-width-space to prevent VoiceOver disable
2. Absolute position ensures no extra space
links:
- https://unfetteredthoughts.net/2017/09/26/voiceover-and-list-style-type-none/
category: navigation
*/
/* nav li:before {
content: "\200B";
position: absolute;
} */
/* @docs
label: Reduced Motion
note: |
1. Immediately jump any animation to the end point
2. Remove transitions & fixed background attachment
links:
- https://github.com/mozdevs/cssremedy/issues/11
category: accessibility
*/
/* @media (prefers-reduced-motion: reduce) {
*, ::before, ::after {
animation-delay: -1ms !important;
animation-duration: 1ms !important;
animation-iteration-count: 1 !important;
background-attachment: initial !important;
scroll-behavior: auto !important;
transition-delay: 0s !important;
transition-duration: 0s !important;
}
} */
/* @docs
label: Line Heights
note: |
The default `normal` line-height is tightly spaced,
but takes font-metrics into account,
which is important for many fonts.
Looser spacing may improve readability in latin type,
but may cause problems in some scripts --
from cusrive/fantasy fonts to
[Javanese](https://jsbin.com/bezasax/1/edit?html,css,output),
[Persian](https://jsbin.com/qurecom/edit?html,css,output),
and CJK languages.
links:
- https://github.com/mozdevs/cssremedy/issues/7
- https://jsbin.com/bezasax/1/edit?html,css,output
- https://jsbin.com/qurecom/edit?html,css,output
todo: |
- Use `:lang(language-code)` selectors?
- Add typography remedies for other scripts & languages...
category: typography
*/
/* html { line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; }
caption, figcaption, label, legend { line-height: 1.375; } */