Improved colors and contrast in dark mode

This commit is contained in:
squidfunk 2023-09-22 13:33:40 +02:00
parent 8b44f1a74d
commit c9e4a5e265
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
14 changed files with 24 additions and 41 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{"version":3,"sources":["src/templates/assets/stylesheets/palette/_scheme.scss","../../../../src/templates/assets/stylesheets/palette.scss","src/templates/assets/stylesheets/palette/_accent.scss","src/templates/assets/stylesheets/palette/_primary.scss","src/templates/assets/stylesheets/utilities/_break.scss"],"names":[],"mappings":"AA2BA,cAGE,6BAME,sDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CACA,mDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CAGA,gDAAA,CACA,gDAAA,CAGA,mCAAA,CACA,iCAAA,CACA,kCAAA,CACA,mCAAA,CACA,mCAAA,CACA,kCAAA,CACA,iCAAA,CACA,+CAAA,CACA,6DAAA,CACA,gEAAA,CACA,4DAAA,CACA,4DAAA,CACA,6DAAA,CAGA,6CAAA,CAGA,+CAAA,CAGA,uDAAA,CACA,6DAAA,CACA,2DAAA,CAGA,iCAAA,CAGA,8BAAA,CAGA,yDAAA,CACA,iEAAA,CAGA,mDAAA,CACA,mDAAA,CAGA,qDAAA,CACA,uDAAA,CAGA,8DAAA,CAKA,8DAAA,CAKA,0DAAA,CAvEA,iBCeF,CD6DE,kHAEE,YC3DJ,CDkFE,yDACE,4BChFJ,CD+EE,2DACE,4BC7EJ,CD4EE,gEACE,4BC1EJ,CDyEE,2DACE,4BCvEJ,CDsEE,yDACE,4BCpEJ,CDmEE,0DACE,4BCjEJ,CDgEE,gEACE,4BC9DJ,CD6DE,0DACE,4BC3DJ,CD0DE,2OACE,4BC/CJ,CDsDA,+FAGE,iCCpDF,CACF,CC/CE,2BACE,4BAAA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ACA,2DAAA,CAGA,4BF+RF,CE5RE,yCACE,+BF8RJ,CE3RI,kDAEE,0CAAA,CACA,sCAAA,CAFA,mCF+RN,CG3MI,mCD1EA,+CACE,8CFwRJ,CErRI,qDACE,8CFuRN,CElRE,iEACE,mCFoRJ,CACF,CGtNI,sCDvDA,uCACE,oCFgRJ,CACF,CEvQA,8BACE,kDAAA,CACA,4DAAA,CACA,wDAAA,CACA,oDAAA,CACA,6DAAA,CAGA,4BFwQF,CErQE,yCACE,+BFuQJ,CEpQI,kDAEE,0CAAA,CACA,sCAAA,CAFA,mCFwQN,CEjQE,yCACE,6CFmQJ,CG5NI,wCDhCA,8CACE,gDF+PJ,CACF,CGjOI,wCDvBA,iFACE,6CF2PJ,CACF,CGzPI,sCDKA,uCACE,6CFuPJ,CACF","file":"palette.css"}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"version":3,"sources":["src/templates/assets/stylesheets/palette/_scheme.scss","../../../../src/templates/assets/stylesheets/palette.scss","src/templates/assets/stylesheets/palette/_accent.scss","src/templates/assets/stylesheets/palette/_primary.scss","src/templates/assets/stylesheets/utilities/_break.scss"],"names":[],"mappings":"AA2BA,cAGE,6BAME,sDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CACA,mDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CAGA,mDAAA,CACA,gDAAA,CAGA,mCAAA,CACA,iCAAA,CACA,kCAAA,CACA,mCAAA,CACA,mCAAA,CACA,kCAAA,CACA,iCAAA,CACA,+CAAA,CACA,6DAAA,CACA,gEAAA,CACA,4DAAA,CACA,4DAAA,CACA,6DAAA,CAGA,6CAAA,CAGA,+CAAA,CAGA,uDAAA,CACA,6DAAA,CACA,2DAAA,CAGA,iCAAA,CAGA,yDAAA,CACA,iEAAA,CAGA,mDAAA,CACA,mDAAA,CAGA,qDAAA,CACA,uDAAA,CAGA,8DAAA,CAKA,8DAAA,CAKA,0DAAA,CApEA,iBCcF,CD2DE,kHAEE,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kCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCAAA,CAKA,4BFkSN,CEnRE,sEACE,4BFsRJ,CEvRE,+DACE,4BF0RJ,CE3RE,iEACE,4BF8RJ,CE/RE,gEACE,4BFkSJ,CEnSE,iEACE,4BFsSJ,CE7RA,8BACE,mDAAA,CACA,4DAAA,CACA,0DAAA,CACA,oDAAA,CACA,2DAAA,CAGA,4BF8RF,CE3RE,yCACE,+BF6RJ,CE1RI,kDAEE,0CAAA,CACA,sCAAA,CAFA,mCF8RN,CG1MI,mCD1EA,+CACE,8CFuRJ,CEpRI,qDACE,8CFsRN,CEjRE,iEACE,mCFmRJ,CACF,CGrNI,sCDvDA,uCACE,oCF+QJ,CACF,CEtQA,8BACE,kDAAA,CACA,4DAAA,CACA,wDAAA,CACA,oDAAA,CACA,6DAAA,CAGA,4BFuQF,CEpQE,yCACE,+BFsQJ,CEnQI,kDAEE,0CAAA,CACA,sCAAA,CAFA,mCFuQN,CEhQE,yCACE,6CFkQJ,CG3NI,wCDhCA,8CACE,gDF8PJ,CACF,CGhOI,wCDvBA,iFACE,6CF0PJ,CACF,CGxPI,sCDKA,uCACE,6CFsPJ,CACF","file":"palette.css"}

View File

@ -44,10 +44,10 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.9f615399.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.1212ebcf.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.649f08f9.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.a5377069.min.css' | url }}">
{% endif %}
{% include "partials/icons.html" %}
{% endblock %}

View File

@ -67,7 +67,7 @@
// Color hue in the range [0,360] - change this variable to alter the tone
// of the theme, e.g. to make it more redish or greenish
--md-hue: 230;
--md-hue: 225deg;
// Default color shades
--md-default-fg-color: hsla(0, 0%, 0%, 0.87);
@ -81,7 +81,7 @@
// Code color shades
--md-code-fg-color: hsla(200, 18%, 26%, 1);
--md-code-bg-color: hsla(0, 0%, 96%, 1);
--md-code-bg-color: hsla(200, 0%, 96%, 1);
// Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-blue-a200)}, 1);
@ -117,9 +117,6 @@
// Typeset `mark` color shades
--md-typeset-mark-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
// Typeset `strong` color shades
--md-typeset-strong-color: var(--md-default-fg-color);
// Typeset `table` color shades
--md-typeset-table-color: hsla(0, 0%, 0%, 0.12);
--md-typeset-table-color--light: hsla(0, 0%, 0%, 0.035);

View File

@ -182,11 +182,6 @@ kbd {
transition: background-color 125ms;
}
// Strong text
strong {
color: currentcolor;
}
// Show outline for keyboard devices
&.focus-visible {
outline-color: var(--md-accent-fg-color);
@ -327,11 +322,6 @@ kbd {
margin-inline-start: px2em(1px, 12.8px);
}
// Strong text
strong {
color: var(--md-typeset-strong-color);
}
// Blockquotes, possibly nested
blockquote {
padding-inline-start: px2rem(12px);

View File

@ -173,7 +173,6 @@
// Navigation container (for section index pages)
&__container > .md-nav__link {
margin-top: 0;
color: var(--md-typeset-strong-color);
// Stretch first child
&:first-child {

View File

@ -69,7 +69,7 @@ $admonitions: (
font-size: px2rem(12.8px);
color: var(--md-admonition-fg-color);
background-color: var(--md-admonition-bg-color);
border: px2rem(1px) solid $clr-blue-a200;
border: px2rem(1.5px) solid $clr-blue-a200;
border-radius: px2rem(4px);
box-shadow: var(--md-shadow-z1);
transition: box-shadow 125ms;

View File

@ -34,7 +34,7 @@
color-scheme: dark;
// Default color shades
--md-default-fg-color: hsla(var(--md-hue), 15%, 90%, 0.75);
--md-default-fg-color: hsla(var(--md-hue), 15%, 90%, 0.82);
--md-default-fg-color--light: hsla(var(--md-hue), 15%, 90%, 0.56);
--md-default-fg-color--lighter: hsla(var(--md-hue), 15%, 90%, 0.32);
--md-default-fg-color--lightest: hsla(var(--md-hue), 15%, 90%, 0.12);
@ -44,8 +44,8 @@
--md-default-bg-color--lightest: hsla(var(--md-hue), 15%, 14%, 0.07);
// Code color shades
--md-code-fg-color: hsla(var(--md-hue), 18%, 86%, 1);
--md-code-bg-color: hsla(var(--md-hue), 15%, 17%, 1);
--md-code-fg-color: hsla(var(--md-hue), 18%, 86%, 0.82);
--md-code-bg-color: hsla(var(--md-hue), 15%, 18%, 1);
// Code highlighting color shades
--md-code-hl-color--light: hsla(#{hex2hsl($clr-blue-a200)}, 0.15);
@ -69,16 +69,13 @@
--md-typeset-a-color: var(--md-primary-fg-color);
// Typeset `kbd` color shades
--md-typeset-kbd-color: hsla(var(--md-hue), 15%, 95%, 0.12);
--md-typeset-kbd-accent-color: hsla(var(--md-hue), 15%, 95%, 0.2);
--md-typeset-kbd-color: hsla(var(--md-hue), 15%, 90%, 0.12);
--md-typeset-kbd-accent-color: hsla(var(--md-hue), 15%, 90%, 0.2);
--md-typeset-kbd-border-color: hsla(var(--md-hue), 15%, 14%, 1);
// Typeset `mark` color shades
--md-typeset-mark-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.3);
// Typeset `strong` color shades
--md-typeset-strong-color: hsla(0, 100%, 100%, 1);
// Typeset `table` color shades
--md-typeset-table-color: hsla(var(--md-hue), 15%, 95%, 0.12);
--md-typeset-table-color--light: hsla(var(--md-hue), 15%, 95%, 0.035);
@ -98,7 +95,7 @@
// Shadow depth 2
--md-shadow-z2:
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.1),
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.25),
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.25);
// Shadow depth 3
@ -118,19 +115,19 @@
// Adjust link colors for dark primary colors
@each $name, $color in (
"pink": hsl(340, 81%, 63%),
"purple": hsl(291, 43%, 63%),
"deep-purple": hsl(262, 63%, 70%),
"indigo": hsl(219, 66%, 67%),
"purple": hsl(291, 53%, 63%),
"deep-purple": hsl(262, 73%, 70%),
"indigo": hsl(219, 76%, 62%),
"teal": hsl(174, 100%, 40%),
"green": hsl(122, 39%, 60%),
"deep-orange": hsl(14, 100%, 73%),
"brown": hsl(16, 45%, 60%),
"deep-orange": hsl(14, 100%, 65%),
"brown": hsl(16, 45%, 56%),
// Set neutral colors to indigo
"grey": hsl(219, 56%, 63%),
"blue-grey": hsl(219, 56%, 63%),
"white": hsl(219, 56%, 63%),
"black": hsl(219, 56%, 63%)
"grey": hsl(219, 66%, 62%),
"blue-grey": hsl(219, 66%, 62%),
"white": hsl(219, 66%, 62%),
"black": hsl(219, 66%, 62%)
) {
[data-md-color-scheme="slate"][data-md-color-primary="#{$name}"] {
--md-typeset-a-color: #{$color};