From d5ef887d0a27830f90b742bec0052efc273d3972 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 12:14:52 +0200 Subject: [PATCH 1/7] sty: fix draft rendering css --- src/css/watermark.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/css/watermark.css b/src/css/watermark.css index 599491770c..744ff0d0bb 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,3 +1,7 @@ +.md-nav__list { + background-color: #ff0000; +} + .md-header { background-color: #ff0000; } From 37f492fffa369811333ffb8142a626148ebea3f7 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 12:32:07 +0200 Subject: [PATCH 2/7] try md-sidebar --- src/css/watermark.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/watermark.css b/src/css/watermark.css index 744ff0d0bb..b12b4be545 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,4 +1,4 @@ -.md-nav__list { +.md-sidebar { background-color: #ff0000; } From 1c29770afb9c22e6225749e31688beaacd021270 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 12:36:22 +0200 Subject: [PATCH 3/7] try nav__title --- src/css/watermark.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/watermark.css b/src/css/watermark.css index b12b4be545..ae5ab735b5 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,4 +1,4 @@ -.md-sidebar { +.md-nav__title { background-color: #ff0000; } From 07e80b8f954b04995900dc2be85802f1547a36eb Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 12:54:09 +0200 Subject: [PATCH 4/7] try [for=__drawer] --- src/css/watermark.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/watermark.css b/src/css/watermark.css index ae5ab735b5..14e5186513 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,4 +1,4 @@ -.md-nav__title { +.md-nav__title[for=__drawer] { background-color: #ff0000; } From 1b5d2bcdfee73ded8014e2ddbadd3e46ddffde4b Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 13:07:37 +0200 Subject: [PATCH 5/7] try set color via :root instead --- src/css/watermark.css | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/css/watermark.css b/src/css/watermark.css index 14e5186513..4371331d34 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,11 +1,3 @@ -.md-nav__title[for=__drawer] { - background-color: #ff0000; -} - -.md-header { - background-color: #ff0000; -} - .md-main__inner { background-image: url(../images/draft_watermark.png); background-repeat: no-repeat; @@ -13,3 +5,8 @@ background-size: contain, cover; background-position: center; } + + /* See: https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-color-schemes */ +:root { + --md-primary-fg-color: #ff0000; +} From fc1f272c0c39bf1fd5d703529aa85d3e6256ad70 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 13:37:19 +0200 Subject: [PATCH 6/7] try conditional css and do not accept overrides --- src/css/watermark.css | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/css/watermark.css b/src/css/watermark.css index 4371331d34..44f6f03230 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,3 +1,13 @@ +@media screen and (max-width: 76.1875em) { + .md-nav__title[for=__drawer] { + background-color: #ff0000 !important; + } + } + +.md-header { + background-color: #ff0000; +} + .md-main__inner { background-image: url(../images/draft_watermark.png); background-repeat: no-repeat; @@ -5,8 +15,3 @@ background-size: contain, cover; background-position: center; } - - /* See: https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-color-schemes */ -:root { - --md-primary-fg-color: #ff0000; -} From 8d26fbf91452cacada11b72d8a70a3e17556d69f Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 2 Oct 2021 17:40:14 +0200 Subject: [PATCH 7/7] better style and comment --- src/css/watermark.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/css/watermark.css b/src/css/watermark.css index 44f6f03230..ee2d56ab03 100644 --- a/src/css/watermark.css +++ b/src/css/watermark.css @@ -1,8 +1,9 @@ +/* 76.1875em are based on stylesheets: https://github.com/squidfunk/mkdocs-material/tree/master/material/assets/stylesheets */ @media screen and (max-width: 76.1875em) { .md-nav__title[for=__drawer] { background-color: #ff0000 !important; } - } +} .md-header { background-color: #ff0000;