diff --git a/projects/plugins/jetpack/changelog/fix-cookie-consent-block-color-fallback b/projects/plugins/jetpack/changelog/fix-cookie-consent-block-color-fallback
new file mode 100644
index 0000000000000..89e061917d063
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/fix-cookie-consent-block-color-fallback
@@ -0,0 +1,4 @@
+Significance: patch
+Type: compat
+
+Cookie Consent Block: ensure we always have a default set of colors to style the block when theme colors are not available.
diff --git a/projects/plugins/jetpack/extensions/blocks/cookie-consent/block.json b/projects/plugins/jetpack/extensions/blocks/cookie-consent/block.json
index a14198fd9eb28..6553a6e2ee9db 100644
--- a/projects/plugins/jetpack/extensions/blocks/cookie-consent/block.json
+++ b/projects/plugins/jetpack/extensions/blocks/cookie-consent/block.json
@@ -38,9 +38,9 @@
"type": "object",
"default": {
"color": {
- "text": "var(--wp--preset--color--contrast)",
- "background": "var(--wp--preset--color--tertiary)",
- "link": "var(--wp--preset--color--contrast)"
+ "text": "var(--wp--preset--color--contrast, #000000)",
+ "background": "var(--wp--preset--color--tertiary, #f0f0f0)",
+ "link": "var(--wp--preset--color--contrast, #000000)"
},
"spacing": {
"padding": {
diff --git a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.html b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.html
index 7157efb923474..c5ed189802d88 100644
--- a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.html
+++ b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.html
@@ -1,5 +1,5 @@
-
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
+
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365
diff --git a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.json b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.json
index 6b9feaf656ccb..9b7c3bab9b4a7 100644
--- a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.json
+++ b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.json
@@ -7,9 +7,9 @@
"text": "Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here:
Cookie Policy.",
"style": {
"color": {
- "text": "var(--wp--preset--color--contrast)",
- "background": "var(--wp--preset--color--tertiary)",
- "link": "var(--wp--preset--color--contrast)"
+ "text": "var(--wp--preset--color--contrast, #000000)",
+ "background": "var(--wp--preset--color--tertiary, #f0f0f0)",
+ "link": "var(--wp--preset--color--contrast, #000000)"
},
"spacing": {
"padding": {
@@ -25,6 +25,6 @@
"showOverlay": false
},
"innerBlocks": [],
- "originalContent": "
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365"
+ "originalContent": "
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365"
}
]
diff --git a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.parsed.json b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.parsed.json
index 3f07a877f9351..98568006b43de 100644
--- a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.parsed.json
+++ b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.parsed.json
@@ -13,9 +13,9 @@
]
}
],
- "innerHTML": "\n
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365\n",
+ "innerHTML": "\n
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365\n",
"innerContent": [
- "\n
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
",
+ "\n
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
",
null,
"
365\n"
]
diff --git a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.serialized.html b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.serialized.html
index 8df88b124fd00..81aaeca454298 100644
--- a/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.serialized.html
+++ b/projects/plugins/jetpack/extensions/blocks/cookie-consent/test/fixtures/jetpack__cookie-consent.serialized.html
@@ -1,3 +1,3 @@
-
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365
+
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy.
365