diff --git a/cypress/e2e/seo.cy.js b/cypress/e2e/seo.cy.js index cec441b..54da609 100644 --- a/cypress/e2e/seo.cy.js +++ b/cypress/e2e/seo.cy.js @@ -368,6 +368,14 @@ describe("Extended tags", () => { "Agent" ); }); + + it("sets the media attribute when included", () => { + cy.get('head meta[name="theme-color"]').should( + "have.attr", + "media", + "(prefers-color-scheme: dark)" + ); + }); }); describe("Extended link tags", () => { diff --git a/src/pages/extendedTags.astro b/src/pages/extendedTags.astro index 29f8853..f940668 100644 --- a/src/pages/extendedTags.astro +++ b/src/pages/extendedTags.astro @@ -20,6 +20,7 @@ import SEO from "../SEO.astro"; }, { name: "twitter:title", content: "Tinker Tailor Soldier Spy" }, { name: "twitter:description", content: "Agent" }, + { name: "theme-color", media: "(prefers-color-scheme: dark)", content: "theme_color_dark" } ], }} />