2022-04-27 08:41:36 -07:00
|
|
|
/* The dark stylesheet is the only place we set custom colors besides
|
|
|
|
* border colors for inline text. Make sure the perceptual contrast
|
|
|
|
* stays within the ideal APCA ranges, not lower and preferably not
|
|
|
|
* higher either. */
|
2020-11-03 15:46:20 -08:00
|
|
|
@media (prefers-color-scheme: dark) {
|
2022-05-26 17:06:56 -07:00
|
|
|
button,
|
|
|
|
html,
|
|
|
|
input {
|
2022-04-27 08:41:36 -07:00
|
|
|
/* Pure white on black causes halation.
|
|
|
|
* "background" is short for a bunch of unnecessary CSS rules
|
2022-05-23 08:54:06 -07:00
|
|
|
* background-color is all I need.
|
|
|
|
* This is the brightest background that still achieves an APCA
|
|
|
|
* contrast of 90 Lc.*/
|
2022-05-26 18:00:02 -07:00
|
|
|
background-color: #191919;
|
2022-04-27 08:41:36 -07:00
|
|
|
/* Dimming the default text color is not the same as reducing screen
|
|
|
|
* brightness, since other colors in this stylesheet have brighter
|
|
|
|
* red and blue channels than the default text. */
|
2022-05-23 08:54:06 -07:00
|
|
|
color: #e6e6e6;
|
2022-04-23 15:35:08 -07:00
|
|
|
}
|
|
|
|
|
2022-06-28 08:52:07 -07:00
|
|
|
mark {
|
|
|
|
color: #000;
|
|
|
|
background-color: #eee7b2;
|
|
|
|
}
|
|
|
|
|
2022-04-13 18:19:49 -07:00
|
|
|
/* Only color <a> if it's a link; if href is empty, let it be. */
|
|
|
|
a:link {
|
2022-05-23 08:54:06 -07:00
|
|
|
color: #eee7b2;
|
2020-11-23 15:47:27 -08:00
|
|
|
}
|
2020-11-03 15:46:20 -08:00
|
|
|
|
2020-12-15 23:18:18 -08:00
|
|
|
a:visited {
|
2022-05-23 08:54:06 -07:00
|
|
|
color: #ffdaff;
|
|
|
|
}
|
|
|
|
|
2022-08-01 21:24:53 -07:00
|
|
|
/* For users who request less contrast, target ACPA Lc of -85 to -86 */
|
2022-05-23 08:54:06 -07:00
|
|
|
@media (prefers-contrast: less) {
|
|
|
|
html {
|
|
|
|
background-color: #333;
|
|
|
|
}
|
2020-11-23 15:47:27 -08:00
|
|
|
}
|
2022-03-30 17:44:39 -07:00
|
|
|
|
2022-05-23 08:42:24 -07:00
|
|
|
/* Small text needs higher contrast. */
|
|
|
|
@media not (prefers-contrast: less) {
|
2022-08-01 21:24:53 -07:00
|
|
|
sup a:link:not(:active) {
|
2022-05-23 08:42:24 -07:00
|
|
|
color: #feb;
|
|
|
|
}
|
|
|
|
|
2022-08-01 21:24:53 -07:00
|
|
|
sup a:visited:not(:active) {
|
|
|
|
color: #ffe6ff;
|
2022-05-23 08:42:24 -07:00
|
|
|
}
|
2022-05-01 17:04:20 -07:00
|
|
|
}
|
|
|
|
|
2022-08-01 21:24:53 -07:00
|
|
|
/* For users who request more contrast, target ACPA Lc near -96 */
|
2022-05-23 08:54:06 -07:00
|
|
|
@media (prefers-contrast: more) {
|
2022-03-30 17:44:39 -07:00
|
|
|
html {
|
2022-05-23 08:54:06 -07:00
|
|
|
background-color: #111;
|
|
|
|
color: #eee;
|
2022-03-30 17:44:39 -07:00
|
|
|
}
|
2022-08-01 21:24:53 -07:00
|
|
|
|
|
|
|
a:link {
|
|
|
|
color: #feb;
|
|
|
|
}
|
|
|
|
a:visited {
|
|
|
|
color: #ffe6ff;
|
|
|
|
}
|
2022-03-30 17:44:39 -07:00
|
|
|
}
|
2022-05-23 08:54:06 -07:00
|
|
|
|
2022-08-01 21:24:53 -07:00
|
|
|
/* Specified last so it overrides :visited. I chose this color because
|
2022-08-03 21:31:05 -07:00
|
|
|
* it's dimmer, so it's noticeable even without color vision. However,
|
|
|
|
* it still meets the experimental SAPC-APCA threshold for "spot"
|
|
|
|
* contrast. */
|
2022-08-01 21:24:53 -07:00
|
|
|
a:active {
|
|
|
|
color: #f83;
|
|
|
|
}
|
2020-11-03 15:46:20 -08:00
|
|
|
}
|