From 7f82f4c8c7e5ee18b5f1f097c0ef89b45525a2d0 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Tue, 24 Jan 2023 13:51:44 -0600 Subject: [PATCH] Use a sun for light theme toggle instead of moon --- lib/resources/styles.css | 20 +++++++++++++------ .../templates.aot_renderers_for_html.dart | 5 ++++- lib/templates/html/_head.html | 5 ++++- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/resources/styles.css b/lib/resources/styles.css index a3f1ea03ea..59aaf75036 100644 --- a/lib/resources/styles.css +++ b/lib/resources/styles.css @@ -70,13 +70,26 @@ display: none; } +#theme-button { + position: absolute; + right: 30px; + height: 24px; +} + #theme-button .material-symbols-outlined { - padding-top: 6px; color: var(--main-icon-color); user-select: none; cursor: pointer; } +.light-theme #light-theme-button { + display: none; +} + +.dark-theme #dark-theme-button { + display: none; +} + /* Only show images that fit their theme using GitHub's syntax, see: https://github.blog/changelog/2021-11-24-specify-theme-context-for-images-in-markdown/ @@ -953,11 +966,6 @@ button { padding-right: 60px; } -#theme-button { - position: absolute; - right: 30px; -} - .tt-menu { position: absolute; top: 100%; diff --git a/lib/src/generator/templates.aot_renderers_for_html.dart b/lib/src/generator/templates.aot_renderers_for_html.dart index 07f5314a84..91dabbeaa7 100644 --- a/lib/src/generator/templates.aot_renderers_for_html.dart +++ b/lib/src/generator/templates.aot_renderers_for_html.dart @@ -3126,9 +3126,12 @@ String _deduplicated_lib_templates_html__head_html(
diff --git a/lib/templates/html/_head.html b/lib/templates/html/_head.html index 980bb50081..fe93a83a45 100644 --- a/lib/templates/html/_head.html +++ b/lib/templates/html/_head.html @@ -60,9 +60,12 @@