Skip to content

Instantly share code, notes, and snippets.

@Fasteroid
Last active November 12, 2024 20:08
Show Gist options
  • Save Fasteroid/5a5dd50b428253dad9ad2456e78cd46f to your computer and use it in GitHub Desktop.
Save Fasteroid/5a5dd50b428253dad9ad2456e78cd46f to your computer and use it in GitHub Desktop.
Makes the new Angular docs site more accessible by getting rid of gradients on text.
@-moz-document domain("angular.dev") {
/*
Angular.dev "accessible" edit
Revision 2
*/
.docs-dark-mode, .docs-light-mode {
--red-to-pink-horizontal-gradient: var(--hot-red);
--red-to-pink-to-purple-horizontal-gradient: var(--vivid-pink);
--pink-to-highlight-to-purple-to-blue-horizontal-gradient: var(--electric-violet);
--purple-to-blue-horizontal-gradient: var(--bright-blue);
--purple-to-blue-vertical-gradient: var(--electric-violet);
--red-to-orange-horizontal-gradient: var(--orange-red);
--red-to-orange-vertical-gradient: var(--orange-red);
--pink-to-purple-horizontal-gradient: var(--vivid-pink);
--pink-to-purple-vertical-gradient: var(--electric-violet);
--purple-to-light-purple-vertical-gradient: var(--french-violet);
--green-to-cyan-vertical-gradient: var(--symbolic-cyan);
--blue-to-teal-vertical-gradient: var(--light-blue);
--blue-to-cyan-vertical-gradient: var(--bright-blue);
--black-to-gray-vertical-gradient: var(--gray-400);
--red-to-pink-vertical-gradient: var(--hot-red);
--orange-to-pink-vertical-gradient: var(--light-orange);
}
.docs-example-viewer-actions .mat-mdc-tab-header .mdc-tab--active span {
color: var(--purple-to-blue-horizontal-gradient);
}
.docs-primary-btn {
color: var(--vivid-pink);
}
.docs-faceted-list-item a,.docs-faceted-list-item button:not(.docs-expanded-button) {
color: var(--quaternary-contrast);
}
.docs-callout h2,.docs-callout h3,.docs-callout h4,.docs-callout h5,.docs-callout h6 {
color: var(--callout-theme);
}
code:not(pre *) {
color: var(--red-to-orange-horizontal-gradient);
}
a:not(.docs-anchor)>code:not(pre *) {
color: var(--purple-to-blue-horizontal-gradient);
}
a:not(.docs-anchor)>code:not(pre *) {
color: var(--purple-to-blue-horizontal-gradient);
}
a:not(.docs-anchor)>code:not(pre *):hover {
color: var(--vivid-pink);
}
.docs-code .docs-code-header h3 {
color: var(--purple-to-blue-horizontal-gradient);
}
.docs-faceted-list-item a.docs-faceted-list-item-active {
color: var(--vivid-pink);
}
}
@Fasteroid
Copy link
Author

Before

image

After

image

(Don't you agree that second one is more readable?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment