From c8885d0790736fb649522a1716ce932f0a82c6f9 Mon Sep 17 00:00:00 2001 From: Peter Becich Date: Fri, 6 Jan 2023 17:10:01 -0800 Subject: [PATCH 1/3] night mode fix for candidate packages --- datafiles/static/hackage.css | 61 +++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/datafiles/static/hackage.css b/datafiles/static/hackage.css index 7a9e05616..b8123a17e 100644 --- a/datafiles/static/hackage.css +++ b/datafiles/static/hackage.css @@ -140,21 +140,37 @@ pre, code, kbd, samp, .src { font-size: 85%; /* 11pt */ } -.candidate-warn { - background-color: #ffdddd; - border-left: 6px solid #f44336; - padding: 0.01em 16px; - margin-bottom: 8px !important; - margin-top: 8px !important; -} +@media (prefers-color-scheme: dark) { + .candidate-warn { + border-left: 6px solid #f44336; + padding: 0.01em 16px; + margin-bottom: 8px !important; + margin-top: 8px !important; + } -.candidate-info { - background-color: #e7f3fe; - border-left: 6px solid #2196F3; - padding: 0.01em 16px; - margin-bottom: 8px; + .candidate-info { + border-left: 6px solid #2196F3; + padding: 0.01em 16px; + margin-bottom: 8px; + } } +@media (prefers-color-scheme: light) { + .candidate-warn { + background-color: #ffdddd; + border-left: 6px solid #f44336; + padding: 0.01em 16px; + margin-bottom: 8px !important; + margin-top: 8px !important; + } + + .candidate-info { + background-color: #e7f3fe; + border-left: 6px solid #2196F3; + padding: 0.01em 16px; + margin-bottom: 8px; + } +} /* @end */ @@ -1014,12 +1030,21 @@ p.tip { /* Misc admin forms */ -.box { - background: #faf9dc; - border: 1px solid #d8d7ad; - padding: 0.5em 1em; - max-width: 35em; - margin: 0.5em 0 1em 1em; +@media (prefers-color-scheme: dark) { + .box { + padding: 0.5em 1em; + max-width: 35em; + margin: 0.5em 0 1em 1em; + } +} +@media (prefers-color-scheme: light) { + .box { + background: #faf9dc; + border: 1px solid #d8d7ad; + padding: 0.5em 1em; + max-width: 35em; + margin: 0.5em 0 1em 1em; + } } table.simpletable th, table.simpletable td { From 2b411c59054de35f95f756f47e4ece67bda05a9d Mon Sep 17 00:00:00 2001 From: Peter Becich Date: Fri, 6 Jan 2023 18:00:58 -0800 Subject: [PATCH 2/3] night mode fix for reverse dependencies modal --- datafiles/static/hackage.css | 12 +++++++++++- datafiles/templates/packagePageAssets.st | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/datafiles/static/hackage.css b/datafiles/static/hackage.css index b8123a17e..0f00e40d0 100644 --- a/datafiles/static/hackage.css +++ b/datafiles/static/hackage.css @@ -545,7 +545,6 @@ table.properties td, table.properties th { padding-bottom: 3em; } - #page-header { background: #5E5184; border-bottom: 5px solid rgba(69, 59, 97, 0.5); @@ -1235,3 +1234,14 @@ a.deprecated[href]:visited { .paginator .current:hover { border: 1px solid #979797; } + +@media (prefers-color-scheme: dark) { + div#modal #content { + background: #222; + } +} +@media (prefers-color-scheme: light) { + div#modal #content { + background: #fff; + } +} diff --git a/datafiles/templates/packagePageAssets.st b/datafiles/templates/packagePageAssets.st index 672335daa..ef924af99 100644 --- a/datafiles/templates/packagePageAssets.st +++ b/datafiles/templates/packagePageAssets.st @@ -20,7 +20,6 @@ div#modal #content { border-radius: 8px; - background: #fff; padding: 20px; } From df8f4ad1949fec60c27385bf7462bb3c5d93139c Mon Sep 17 00:00:00 2001 From: Peter Becich Date: Fri, 6 Jan 2023 18:07:50 -0800 Subject: [PATCH 3/3] indentation --- datafiles/static/hackage.css | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/datafiles/static/hackage.css b/datafiles/static/hackage.css index 0f00e40d0..eb9799580 100644 --- a/datafiles/static/hackage.css +++ b/datafiles/static/hackage.css @@ -141,35 +141,35 @@ pre, code, kbd, samp, .src { } @media (prefers-color-scheme: dark) { - .candidate-warn { - border-left: 6px solid #f44336; - padding: 0.01em 16px; - margin-bottom: 8px !important; - margin-top: 8px !important; - } + .candidate-warn { + border-left: 6px solid #f44336; + padding: 0.01em 16px; + margin-bottom: 8px !important; + margin-top: 8px !important; + } - .candidate-info { - border-left: 6px solid #2196F3; - padding: 0.01em 16px; - margin-bottom: 8px; - } + .candidate-info { + border-left: 6px solid #2196F3; + padding: 0.01em 16px; + margin-bottom: 8px; + } } @media (prefers-color-scheme: light) { - .candidate-warn { - background-color: #ffdddd; - border-left: 6px solid #f44336; - padding: 0.01em 16px; - margin-bottom: 8px !important; - margin-top: 8px !important; - } + .candidate-warn { + background-color: #ffdddd; + border-left: 6px solid #f44336; + padding: 0.01em 16px; + margin-bottom: 8px !important; + margin-top: 8px !important; + } - .candidate-info { - background-color: #e7f3fe; - border-left: 6px solid #2196F3; - padding: 0.01em 16px; - margin-bottom: 8px; - } + .candidate-info { + background-color: #e7f3fe; + border-left: 6px solid #2196F3; + padding: 0.01em 16px; + margin-bottom: 8px; + } } /* @end */