diff --git a/news/changelog-1.7.md b/news/changelog-1.7.md index 1bd9b313460..a92f31857a5 100644 --- a/news/changelog-1.7.md +++ b/news/changelog-1.7.md @@ -51,6 +51,10 @@ All changes included in 1.7: - ([#11835](https://github.com/quarto-dev/quarto-cli/issues/11835)): Take markdown structure into account when detecting minimum heading level. - ([#11964](https://github.com/quarto-dev/quarto-cli/issues/11964)): Using panel layout without a crossref label now correctly do not add an empty `#block[]` that was leading to an unnecessary space in output. +## `revealjs` format + +- ([#12147](https://github.com/quarto-dev/quarto-cli/issues/12147)): `serif` and `simple` themes defaults back to have their heading color (`$presentation-heading-color`) to be the same as the body color (`$body-color`) as in Quarto 1.5. + ## Interactive Shiny Document - ([#12059](https://github.com/quarto-dev/quarto-cli/issues/12059)): `quarto preview` now correctly run on Windows an interactive Quarto doc with Jupyter engine and py-shiny, when using a `*.py` file as resource. diff --git a/package/src/common/patches/revealjs-theme-0001-simple.patch b/package/src/common/patches/revealjs-theme-0001-simple.patch index 7a76407c923..c66acdead03 100644 --- a/package/src/common/patches/revealjs-theme-0001-simple.patch +++ b/package/src/common/patches/revealjs-theme-0001-simple.patch @@ -28,7 +28,7 @@ index f0472d7b9..3b1e3cbdc 100644 +$font-family-sans-serif: "Lato", sans-serif !default; +$body-color: #000 !default; +$presentation-heading-font: "News Cycle", sans-serif !default; -+$presentation-heading-color: #000 !default; ++$presentation-heading-color: $body-color !default; +$presentation-heading-text-shadow: none !default; +$presentation-heading-text-transform: none !default; +$body-bg: #fff !default; diff --git a/package/src/common/patches/revealjs-theme-0001-sky.patch b/package/src/common/patches/revealjs-theme-0001-sky.patch index 8cd3267b9df..9f388f08432 100644 --- a/package/src/common/patches/revealjs-theme-0001-sky.patch +++ b/package/src/common/patches/revealjs-theme-0001-sky.patch @@ -28,7 +28,7 @@ index 62a52b782..2debff7bc 100644 +$font-family-sans-serif: "Open Sans", sans-serif !default; +$body-color: #333 !default; +$presentation-heading-font: "Quicksand", sans-serif !default; -+$presentation-heading-color: #333 !default; ++$presentation-heading-color: $body-color !default; +$presentation-heading-letter-spacing: -0.08em !default; +$presentation-heading-text-shadow: none !default; +$body-bg: #f7fbfc !default; diff --git a/src/resources/formats/revealjs/themes/simple.scss b/src/resources/formats/revealjs/themes/simple.scss index 3b1e3cbdc35..738528455c6 100644 --- a/src/resources/formats/revealjs/themes/simple.scss +++ b/src/resources/formats/revealjs/themes/simple.scss @@ -19,7 +19,7 @@ $font-family-sans-serif: "Lato", sans-serif !default; $body-color: #000 !default; $presentation-heading-font: "News Cycle", sans-serif !default; -$presentation-heading-color: #000 !default; +$presentation-heading-color: $body-color !default; $presentation-heading-text-shadow: none !default; $presentation-heading-text-transform: none !default; $body-bg: #fff !default; diff --git a/src/resources/formats/revealjs/themes/sky.scss b/src/resources/formats/revealjs/themes/sky.scss index 4821a919dad..5e369cfadac 100644 --- a/src/resources/formats/revealjs/themes/sky.scss +++ b/src/resources/formats/revealjs/themes/sky.scss @@ -17,7 +17,7 @@ $font-family-sans-serif: "Open Sans", sans-serif !default; $body-color: #333 !default; $presentation-heading-font: "Quicksand", sans-serif !default; -$presentation-heading-color: #333 !default; +$presentation-heading-color: $body-color !default; $presentation-heading-letter-spacing: -0.08em !default; $presentation-heading-text-shadow: none !default; $body-bg: #f7fbfc !default; diff --git a/tests/docs/playwright/revealjs/heading-color/.gitignore b/tests/docs/playwright/revealjs/heading-color/.gitignore new file mode 100644 index 00000000000..075b2542afb --- /dev/null +++ b/tests/docs/playwright/revealjs/heading-color/.gitignore @@ -0,0 +1 @@ +/.quarto/ diff --git a/tests/docs/playwright/revealjs/heading-color/_quarto.yml b/tests/docs/playwright/revealjs/heading-color/_quarto.yml new file mode 100644 index 00000000000..b8bae5830fa --- /dev/null +++ b/tests/docs/playwright/revealjs/heading-color/_quarto.yml @@ -0,0 +1,2 @@ +project: + type: default diff --git a/tests/docs/playwright/revealjs/heading-color/custom.scss b/tests/docs/playwright/revealjs/heading-color/custom.scss new file mode 100644 index 00000000000..f952edcdad8 --- /dev/null +++ b/tests/docs/playwright/revealjs/heading-color/custom.scss @@ -0,0 +1,3 @@ +/*-- scss:defaults --*/ + +$body-color: #000080; diff --git a/tests/docs/playwright/revealjs/heading-color/serif.qmd b/tests/docs/playwright/revealjs/heading-color/serif.qmd new file mode 100644 index 00000000000..39ddb1f23aa --- /dev/null +++ b/tests/docs/playwright/revealjs/heading-color/serif.qmd @@ -0,0 +1,13 @@ +--- +title: "Quarto Title Test" +format: revealjs +theme: [simple, custom.scss] +--- + +## slide 1 + +Text for slide 1 + +## side 2 + +Text for slide 2 diff --git a/tests/docs/playwright/revealjs/heading-color/simple.qmd b/tests/docs/playwright/revealjs/heading-color/simple.qmd new file mode 100644 index 00000000000..39ddb1f23aa --- /dev/null +++ b/tests/docs/playwright/revealjs/heading-color/simple.qmd @@ -0,0 +1,13 @@ +--- +title: "Quarto Title Test" +format: revealjs +theme: [simple, custom.scss] +--- + +## slide 1 + +Text for slide 1 + +## side 2 + +Text for slide 2 diff --git a/tests/integration/playwright/tests/revealjs-themes.spec.ts b/tests/integration/playwright/tests/revealjs-themes.spec.ts index d8fb52056af..9da3b74792e 100644 --- a/tests/integration/playwright/tests/revealjs-themes.spec.ts +++ b/tests/integration/playwright/tests/revealjs-themes.spec.ts @@ -78,4 +78,19 @@ test('Callout title color in dracula theme is correctly tweaked to use same as b const calloutTitleLoc = page.getByText('Title of the callout', { exact: true }); const calloutContentLoc = page.getByText('Content', { exact: true }); await checkColorIdentical(calloutTitleLoc, calloutContentLoc, 'color'); -}); \ No newline at end of file +}); + +test('Headings color in simple and serif theme are correctly defaulting to $body-bg', async ({ page }) => { + await page.goto('./revealjs/heading-color/simple.html#/slide-1'); + await checkColorIdentical( + page.getByText('Text for slide 1', { exact: true }), + page.getByRole('heading', { name: 'slide' }), + 'color' + ); + await page.goto('./revealjs/heading-color/serif.html#/slide-1'); + await checkColorIdentical( + page.getByText('Text for slide 1', { exact: true }), + page.getByRole('heading', { name: 'slide' }), + 'color' + ); +});