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(