From 84a90c35ed9df6a716a21b21aef1930786c1d255 Mon Sep 17 00:00:00 2001 From: SabyaXSachi Date: Sat, 7 Nov 2026 11:12:49 +0530 Subject: [PATCH 1/2] Fix notebook preview title contrast across themes --- .../formats/html/embed/template.html | 5 +- .../.gitignore | 2 + .../notebook-preview-theme-cerulean/index.qmd | 6 ++ .../notebook.ipynb | 38 ++++++++++ .../.gitignore | 2 + .../index.qmd | 6 ++ .../notebook.ipynb | 38 ++++++++++ .../.gitignore | 2 + .../index.qmd | 6 ++ .../notebook.ipynb | 38 ++++++++++ .../theme-light-heading.scss | 6 ++ .../notebook-preview-title-color.spec.ts | 70 +++++++++++++++++++ 12 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 tests/docs/playwright/html/notebook-preview-theme-cerulean/.gitignore create mode 100644 tests/docs/playwright/html/notebook-preview-theme-cerulean/index.qmd create mode 100644 tests/docs/playwright/html/notebook-preview-theme-cerulean/notebook.ipynb create mode 100644 tests/docs/playwright/html/notebook-preview-theme-dark-heading/.gitignore create mode 100644 tests/docs/playwright/html/notebook-preview-theme-dark-heading/index.qmd create mode 100644 tests/docs/playwright/html/notebook-preview-theme-dark-heading/notebook.ipynb create mode 100644 tests/docs/playwright/html/notebook-preview-theme-light-heading/.gitignore create mode 100644 tests/docs/playwright/html/notebook-preview-theme-light-heading/index.qmd create mode 100644 tests/docs/playwright/html/notebook-preview-theme-light-heading/notebook.ipynb create mode 100644 tests/docs/playwright/html/notebook-preview-theme-light-heading/theme-light-heading.scss create mode 100644 tests/integration/playwright/tests/notebook-preview-title-color.spec.ts diff --git a/src/resources/formats/html/embed/template.html b/src/resources/formats/html/embed/template.html index faf33fb7f08..ee85761d31d 100644 --- a/src/resources/formats/html/embed/template.html +++ b/src/resources/formats/html/embed/template.html @@ -28,12 +28,15 @@ border-bottom: solid 1px; } + /* The title sits on the theme's primary background, so it inherits the + header's contrasting text color instead of the theme heading color */ #quarto-embed-header h6 { font-size: 1.1em; padding-top: 0.6em; margin-left: 1em; margin-right: 1em; font-weight: 400; + color: inherit; } #quarto-embed-header a.quarto-back-link, @@ -123,7 +126,7 @@ -