From 4dd7f490979da2cd7cccfcc755fec8da5b557320 Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Wed, 7 Oct 2026 09:48:32 -0700 Subject: [PATCH] Reserve the red announcement banner for prerelease and fix its contrast --- _quarto-prerelease-docs.yml | 3 ++- theme-dark.scss | 2 +- theme-prerelease-banner.scss | 11 +++++++++++ theme-prerelease-docs.scss | 8 -------- 4 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 theme-prerelease-banner.scss delete mode 100644 theme-prerelease-docs.scss diff --git a/_quarto-prerelease-docs.yml b/_quarto-prerelease-docs.yml index c3a997bc77..f88bef4f72 100644 --- a/_quarto-prerelease-docs.yml +++ b/_quarto-prerelease-docs.yml @@ -18,4 +18,5 @@ format: html: toc: true theme: - light: [cosmo, theme.scss, theme-prerelease-docs.scss] + light: [cosmo, theme.scss, theme-prerelease-banner.scss] + dark: [cosmo, theme-dark.scss, theme-prerelease-banner.scss] diff --git a/theme-dark.scss b/theme-dark.scss index 655f0e0d05..5231b63be0 100644 --- a/theme-dark.scss +++ b/theme-dark.scss @@ -183,7 +183,7 @@ details > summary { font-size: 1em; font-weight: bold; color: $white; - background-color: #ff0039; + background-color: #447099; } #quarto-announcement a { diff --git a/theme-prerelease-banner.scss b/theme-prerelease-banner.scss new file mode 100644 index 0000000000..ffc40d3e1e --- /dev/null +++ b/theme-prerelease-banner.scss @@ -0,0 +1,11 @@ +/*-- scss:rules --*/ + +// Red marks the prerelease site, in light and dark mode. +// #e60033 gives white text 4.76:1 (WCAG 1.4.3 needs 4.5:1). +// Cosmo's $danger (#ff0039) gives only 3.95:1. +#quarto-announcement { + font-size: 1em; + font-weight: bold; + color: $white; + background-color: #e60033; +} diff --git a/theme-prerelease-docs.scss b/theme-prerelease-docs.scss deleted file mode 100644 index 94a041338a..0000000000 --- a/theme-prerelease-docs.scss +++ /dev/null @@ -1,8 +0,0 @@ -/*-- scss:rules --*/ - -#quarto-announcement { - font-size: 1em; - font-weight: bold; - color: $white; - background-color: $danger; -} \ No newline at end of file