Improved contrast ratio of code blocks

This commit is contained in:
squidfunk 2020-08-16 10:26:36 +02:00
parent a6463f290f
commit 31bbd76cd3
14 changed files with 35 additions and 32 deletions

View File

@ -5,10 +5,10 @@
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.d1f5a259.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.d1f5a259.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.fae956e7.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.fae956e7.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.fae956e7.min.js.map", "assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.fae956e7.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.6fb40bf7.min.css", "assets/stylesheets/main.css": "assets/stylesheets/main.228d2bc1.min.css",
"assets/stylesheets/main.css.map": "assets/stylesheets/main.6fb40bf7.min.css.map", "assets/stylesheets/main.css.map": "assets/stylesheets/main.228d2bc1.min.css.map",
"assets/stylesheets/overrides.css": "assets/stylesheets/overrides.011ebae6.min.css", "assets/stylesheets/overrides.css": "assets/stylesheets/overrides.011ebae6.min.css",
"assets/stylesheets/overrides.css.map": "assets/stylesheets/overrides.011ebae6.min.css.map", "assets/stylesheets/overrides.css.map": "assets/stylesheets/overrides.011ebae6.min.css.map",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.cef4c379.min.css", "assets/stylesheets/palette.css": "assets/stylesheets/palette.05036cbf.min.css",
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.cef4c379.min.css.map" "assets/stylesheets/palette.css.map": "assets/stylesheets/palette.05036cbf.min.css.map"
} }

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

File diff suppressed because one or more lines are too long

View File

@ -41,9 +41,9 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.6fb40bf7.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.228d2bc1.min.css' | url }}">
{% if palette.scheme or palette.primary or palette.accent %} {% if palette.scheme or palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.cef4c379.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.05036cbf.min.css' | url }}">
{% endif %} {% endif %}
{% if palette.primary %} {% if palette.primary %}
{% import "partials/palette.html" as map %} {% import "partials/palette.html" as map %}

View File

@ -59,17 +59,17 @@
// Code highlighting color shades // Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5); --md-code-hl-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
--md-code-hl-number-color: hsla(6, 71%, 60%, 1); --md-code-hl-number-color: hsla(0, 65%, 54%, 1);
--md-code-hl-special-color: hsla(340, 83%, 66%, 1); --md-code-hl-special-color: hsla(340, 83%, 47%, 1);
--md-code-hl-function-color: hsla(291, 57%, 65%, 1); --md-code-hl-function-color: hsla(291, 45%, 50%, 1);
--md-code-hl-constant-color: hsla(250, 70%, 64%, 1); --md-code-hl-constant-color: hsla(250, 63%, 61%, 1);
--md-code-hl-keyword-color: hsla(219, 71%, 60%, 1); --md-code-hl-keyword-color: hsla(219, 54%, 51%, 1);
--md-code-hl-string-color: hsla(150, 58%, 44%, 1); --md-code-hl-string-color: hsla(150, 63%, 31%, 1);
--md-code-hl-name-color: var(--md-code-fg-color); --md-code-hl-name-color: var(--md-code-fg-color);
--md-code-hl-operator-color: var(--md-default-fg-color--light); --md-code-hl-operator-color: var(--md-default-fg-color--light);
--md-code-hl-punctuation-color: var(--md-default-fg-color--lighter); --md-code-hl-punctuation-color: var(--md-default-fg-color--light);
--md-code-hl-comment-color: var(--md-default-fg-color--lighter); --md-code-hl-comment-color: var(--md-default-fg-color--light);
--md-code-hl-generic-color: var(--md-default-fg-color--lighter); --md-code-hl-generic-color: var(--md-default-fg-color--light);
--md-code-hl-variable-color: var(--md-default-fg-color--light); --md-code-hl-variable-color: var(--md-default-fg-color--light);
// Typeset color shades // Typeset color shades

View File

@ -193,11 +193,11 @@
// Add spacing to line number container // Add spacing to line number container
.linenodiv { .linenodiv {
padding-right: px2em(8px, 13.6px); padding-right: px2em(8px, 13.6px);
box-shadow: px2rem(-1px) 0 var(--md-default-fg-color--lightest) inset; box-shadow: px2rem(-1px) 0 var(--md-default-fg-color--lighter) inset;
// Reset spacings // Reset spacings
pre { pre {
color: var(--md-default-fg-color--lighter); color: var(--md-default-fg-color--light);
text-align: right; text-align: right;
} }
} }

View File

@ -38,9 +38,9 @@
margin-right: px2em(16px, 13.6px); margin-right: px2em(16px, 13.6px);
margin-left: px2em(-16px, 13.6px); margin-left: px2em(-16px, 13.6px);
padding-left: px2em(16px, 13.6px); padding-left: px2em(16px, 13.6px);
color: var(--md-default-fg-color--lighter); color: var(--md-default-fg-color--light);
background-color: var(--md-code-bg-color); background-color: var(--md-code-bg-color);
box-shadow: px2rem(-1px) 0 var(--md-default-fg-color--lightest) inset; box-shadow: px2rem(-1px) 0 var(--md-default-fg-color--lighter) inset;
content: attr(data-linenos); content: attr(data-linenos);
user-select: none; user-select: none;
} }

View File

@ -122,7 +122,7 @@
// Blurred link // Blurred link
&[data-md-state="blur"] { &[data-md-state="blur"] {
color: var(--md-default-fg-color--lighter); color: var(--md-default-fg-color--light);
} }
// Active link // Active link

View File

@ -34,7 +34,7 @@
// Default color shades // Default color shades
--md-default-fg-color: hsla(var(--md-hue), 75%, 95%, 1); --md-default-fg-color: hsla(var(--md-hue), 75%, 95%, 1);
--md-default-fg-color--light: hsla(var(--md-hue), 75%, 90%, 0.57); --md-default-fg-color--light: hsla(var(--md-hue), 75%, 90%, 0.62);
--md-default-fg-color--lighter: hsla(var(--md-hue), 75%, 90%, 0.32); --md-default-fg-color--lighter: hsla(var(--md-hue), 75%, 90%, 0.32);
--md-default-fg-color--lightest: hsla(var(--md-hue), 75%, 90%, 0.12); --md-default-fg-color--lightest: hsla(var(--md-hue), 75%, 90%, 0.12);
--md-default-bg-color: hsla(var(--md-hue), 15%, 21%, 1); --md-default-bg-color: hsla(var(--md-hue), 15%, 21%, 1);
@ -47,10 +47,13 @@
--md-code-bg-color: hsla(var(--md-hue), 15%, 18%, 1); --md-code-bg-color: hsla(var(--md-hue), 15%, 18%, 1);
// Code highlighting color shades // Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.3); --md-code-hl-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.15);
--md-code-hl-punctuation-color: hsla(var(--md-hue), 34%, 71%, 0.3); --md-code-hl-number-color: hsla(6, 74%, 63%, 1);
--md-code-hl-comment-color: hsla(var(--md-hue), 34%, 71%, 0.3); --md-code-hl-special-color: hsla(340, 83%, 66%, 1);
--md-code-hl-generic-color: hsla(var(--md-hue), 34%, 71%, 0.3); --md-code-hl-function-color: hsla(291, 57%, 65%, 1);
--md-code-hl-constant-color: hsla(250, 62%, 70%, 1);
--md-code-hl-keyword-color: hsla(219, 66%, 64%, 1);
--md-code-hl-string-color: hsla(150, 58%, 44%, 1);
// Typeset color shades // Typeset color shades
--md-typeset-a-color: var(--md-primary-fg-color--light); --md-typeset-a-color: var(--md-primary-fg-color--light);