1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-23 23:21:00 +01:00

Fixed unreadable print view when using dark mode

This commit is contained in:
squidfunk 2020-10-17 16:45:20 +02:00
parent c6a67ec093
commit ab60de2b61
6 changed files with 49 additions and 45 deletions

View File

@ -9,6 +9,6 @@
"assets/stylesheets/main.css.map": "assets/stylesheets/main.ce7da9e3.min.css.map",
"assets/stylesheets/overrides.css": "assets/stylesheets/overrides.2a4bbe42.min.css",
"assets/stylesheets/overrides.css.map": "assets/stylesheets/overrides.2a4bbe42.min.css.map",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.3f72e892.min.css",
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.3f72e892.min.css.map"
"assets/stylesheets/palette.css": "assets/stylesheets/palette.31e6bbac.min.css",
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.31e6bbac.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

View File

@ -37,7 +37,7 @@
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.ce7da9e3.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.3f72e892.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.31e6bbac.min.css' | url }}">
{% if palette.primary %}
{% import "partials/palette.html" as map %}
{% set primary = map.primary(

View File

@ -24,52 +24,56 @@
// Rules
// ----------------------------------------------------------------------------
// Slate theme, i.e. dark mode
[data-md-color-scheme="slate"] {
// Only use dark mode on screens
@media screen {
// Slate's 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. This is a slate-
// specific variable, but the same approach may be adapted to custom themes.
--md-hue: 232;
// Slate theme, i.e. dark mode
[data-md-color-scheme="slate"] {
// Default color shades
--md-default-fg-color: hsla(var(--md-hue), 75%, 95%, 1);
--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--lightest: hsla(var(--md-hue), 75%, 90%, 0.12);
--md-default-bg-color: hsla(var(--md-hue), 15%, 21%, 1);
--md-default-bg-color--light: hsla(var(--md-hue), 15%, 21%, 0.54);
--md-default-bg-color--lighter: hsla(var(--md-hue), 15%, 21%, 0.26);
--md-default-bg-color--lightest: hsla(var(--md-hue), 15%, 21%, 0.07);
// Slate's 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. This is a slate-
// specific variable, but the same approach may be adapted to custom themes.
--md-hue: 232;
// Code color shades
--md-code-fg-color: hsla(var(--md-hue), 18%, 86%, 1);
--md-code-bg-color: hsla(var(--md-hue), 15%, 15%, 1);
// Default color shades
--md-default-fg-color: hsla(var(--md-hue), 75%, 95%, 1);
--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--lightest: hsla(var(--md-hue), 75%, 90%, 0.12);
--md-default-bg-color: hsla(var(--md-hue), 15%, 21%, 1);
--md-default-bg-color--light: hsla(var(--md-hue), 15%, 21%, 0.54);
--md-default-bg-color--lighter: hsla(var(--md-hue), 15%, 21%, 0.26);
--md-default-bg-color--lightest: hsla(var(--md-hue), 15%, 21%, 0.07);
// Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.15);
--md-code-hl-number-color: hsla(6, 74%, 63%, 1);
--md-code-hl-special-color: hsla(340, 83%, 66%, 1);
--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);
// Code color shades
--md-code-fg-color: hsla(var(--md-hue), 18%, 86%, 1);
--md-code-bg-color: hsla(var(--md-hue), 15%, 15%, 1);
// Typeset color shades
--md-typeset-a-color: var(--md-primary-fg-color--light);
// Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.15);
--md-code-hl-number-color: hsla(6, 74%, 63%, 1);
--md-code-hl-special-color: hsla(340, 83%, 66%, 1);
--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 `mark` color shades
--md-typeset-mark-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.3);
// Typeset color shades
--md-typeset-a-color: var(--md-primary-fg-color--light);
// Typeset `kbd` color shades
--md-typeset-kbd-color: hsla(var(--md-hue), 15%, 94%, 0.12);
--md-typeset-kbd-accent-color: hsla(var(--md-hue), 15%, 94%, 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);
// Admonition color shades
--md-admonition-bg-color: hsla(var(--md-hue), 0%, 100%, 0.025);
// Typeset `kbd` color shades
--md-typeset-kbd-color: hsla(var(--md-hue), 15%, 94%, 0.12);
--md-typeset-kbd-accent-color: hsla(var(--md-hue), 15%, 94%, 0.2);
--md-typeset-kbd-border-color: hsla(var(--md-hue), 15%, 14%, 1);
// Footer color shades
--md-footer-bg-color: hsla(var(--md-hue), 15%, 12%, 0.87);
--md-footer-bg-color--dark: hsla(var(--md-hue), 15%, 10%, 1);
// Admonition color shades
--md-admonition-bg-color: hsla(var(--md-hue), 0%, 100%, 0.025);
// Footer color shades
--md-footer-bg-color: hsla(var(--md-hue), 15%, 12%, 0.87);
--md-footer-bg-color--dark: hsla(var(--md-hue), 15%, 10%, 1);
}
}