From bec98bae593e9eee8d7c2b6e43c6db743ecbab52 Mon Sep 17 00:00:00 2001 From: John Franey <1728528+johnfraney@users.noreply.github.com> Date: Tue, 31 Dec 2024 19:53:29 -0400 Subject: [PATCH] style: better a11y for dark mode homepage gradient --- docs/templates/WebSite.html.jinja | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/templates/WebSite.html.jinja b/docs/templates/WebSite.html.jinja index 585cd60..cca1f05 100644 --- a/docs/templates/WebSite.html.jinja +++ b/docs/templates/WebSite.html.jinja @@ -36,7 +36,7 @@ h1 { max-width: 900px; font-size: 3rem; text-align: center; - background: linear-gradient(to right,rgb(201, 190, 99),rgb(168, 157, 56),rgb(172, 156, 64),rgb(130, 117, 46)); + background: linear-gradient(to right,rgb(201, 190, 99),rgb(168, 157, 56),rgb(153, 137, 47),rgb(104, 93, 29)); -webkit-background-clip: text; background-clip: text; color: transparent; @@ -44,6 +44,14 @@ h1 { padding: 0.5rem 0; } +@media(prefers-color-scheme: dark) { + h1 { + background: linear-gradient(to right,rgb(243, 236, 176),rgb(216, 207, 130),rgb(204, 195, 112),rgb(122, 113, 30)); + -webkit-background-clip: text; + background-clip: text; + } +} + main > pre { max-width: 650px; margin: calc(var(--pico-spacing) * 3) auto;