From 6109b8573047d993f88c7da127955aee5f4f1365 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Tue, 7 Jul 2026 12:18:54 +0200 Subject: [PATCH 01/11] ## Add cta-consultation-band pattern - Created `patterns/cta/cta-consultation-band.php` with badge, heading, CTA buttons, and reassurance tiles - Added 4 new colour tokens for fixed-dark surfaces to `theme.json` and `styles/dark.json` - Mapped Phosphor icons: `check`, `chat-circle`, `star` --- patterns/cta/cta-consultation-band.php | 102 +++++++++++++++++++++++++ styles/dark.json | 8 +- theme.json | 8 +- 3 files changed, 114 insertions(+), 4 deletions(-) create mode 100644 patterns/cta/cta-consultation-band.php diff --git a/patterns/cta/cta-consultation-band.php b/patterns/cta/cta-consultation-band.php new file mode 100644 index 0000000..ae267fc --- /dev/null +++ b/patterns/cta/cta-consultation-band.php @@ -0,0 +1,102 @@ + + +
+ + +
+ + +
+ + +
+ +
+ + + +

+ +
+ + + +

+ + + +

+ +
+ + + +
+ +
+ +
+ +
+ + + + + +
+ +
+ + + +
+ + +
+ + + +

+ +
+ + + +
+ + + +

+ +
+ + + +
+ + + +

+ +
+ + +
+ + +
+ diff --git a/styles/dark.json b/styles/dark.json index 9a14f5b..b4e1a41 100644 --- a/styles/dark.json +++ b/styles/dark.json @@ -10,7 +10,9 @@ "inverse": "var:preset|color|contrast", "muted": "var:preset|color|neutral-400", "brand": "var:preset|color|cta-500", - "brand-strong": "var:preset|color|cta-200" + "brand-strong": "var:preset|color|cta-200", + "on-dark": "var:preset|color|base", + "on-dark-muted": "var:preset|color|neutral-400" }, "surface": { "canvas": "var:preset|color|contrast", @@ -23,7 +25,9 @@ "cta": "var:preset|color|accent-two-500", "accent-light": "var:preset|color|accent-900", "accent-two-light": "var:preset|color|accent-two-900", - "accent-three-light": "var:preset|color|accent-three-900" + "accent-three-light": "var:preset|color|accent-three-900", + "band-start": "var:preset|color|surface-700", + "band-end": "var:preset|color|surface-300" }, "border": { "card": "var:preset|color|neutral-800" diff --git a/theme.json b/theme.json index f89a1da..a92f5be 100644 --- a/theme.json +++ b/theme.json @@ -416,7 +416,9 @@ "inverse": "var:preset|color|base", "muted": "var:preset|color|neutral-700", "brand": "var:preset|color|brand-500", - "brand-strong": "var:preset|color|brand-800" + "brand-strong": "var:preset|color|brand-800", + "on-dark": "var:preset|color|base", + "on-dark-muted": "var:preset|color|neutral-400" }, "surface": { "canvas": "var:preset|color|base", @@ -429,7 +431,9 @@ "cta": "var:preset|color|cta-500", "accent-light": "var:preset|color|accent-100", "accent-two-light": "var:preset|color|accent-two-100", - "accent-three-light": "var:preset|color|accent-three-100" + "accent-three-light": "var:preset|color|accent-three-100", + "band-start": "var:preset|color|surface-700", + "band-end": "var:preset|color|surface-300" }, "border": { "card": "var:preset|color|neutral-300" From 4af8187aecb2228b17123b12323ef3bbcb861205 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Tue, 7 Jul 2026 14:11:22 +0200 Subject: [PATCH 02/11] ## Add cta-consultation-inline pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Created `patterns/cta/cta-consultation-inline.php` — compact inline CTA card with phone badge, heading, body copy, and button - Created `styles/sections/cta/cta-inline-card.json` — new fixed-dark card shell with accent left border - Added 1 new colour token (`surface.on-dark-card`) to `theme.json` and `styles/dark.json` - Reused existing tokens: `icon.background`, `icon.color`, `text.brand`, `text.on-dark` --- patterns/cta/cta-consultation-inline.php | 51 ++++++++++++++++++++++++ styles/dark.json | 3 +- styles/sections/cta/cta-inline-card.json | 32 +++++++++++++++ theme.json | 3 +- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 patterns/cta/cta-consultation-inline.php create mode 100644 styles/sections/cta/cta-inline-card.json diff --git a/patterns/cta/cta-consultation-inline.php b/patterns/cta/cta-consultation-inline.php new file mode 100644 index 0000000..6d2e1d9 --- /dev/null +++ b/patterns/cta/cta-consultation-inline.php @@ -0,0 +1,51 @@ + + + + diff --git a/styles/dark.json b/styles/dark.json index b4e1a41..d64a5c3 100644 --- a/styles/dark.json +++ b/styles/dark.json @@ -27,7 +27,8 @@ "accent-two-light": "var:preset|color|accent-two-900", "accent-three-light": "var:preset|color|accent-three-900", "band-start": "var:preset|color|surface-700", - "band-end": "var:preset|color|surface-300" + "band-end": "var:preset|color|surface-300", + "on-dark-card": "var:preset|color|surface-200" }, "border": { "card": "var:preset|color|neutral-800" diff --git a/styles/sections/cta/cta-inline-card.json b/styles/sections/cta/cta-inline-card.json new file mode 100644 index 0000000..4c01dc5 --- /dev/null +++ b/styles/sections/cta/cta-inline-card.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://schemas.wp.org/wp/6.9/theme.json", + "version": 3, + "title": "CTA Inline Card", + "slug": "cta-inline-card", + "blockTypes": [ + "core/group" + ], + "description": "Fixed-dark inline CTA card shell with an accent left border, for compact consultation callouts.", + "styles": { + "color": { + "background": "var:custom|color|surface|on-dark-card", + "text": "var:custom|color|text|on-dark" + }, + "border": { + "color": "var:custom|color|text|brand", + "radius": "var:preset|border-radius|200", + "style": "solid", + "width": "1px" + }, + "spacing": { + "blockGap": "var:preset|spacing|20", + "padding": { + "top": "var:preset|spacing|30", + "right": "var:preset|spacing|30", + "bottom": "var:preset|spacing|30", + "left": "var:preset|spacing|30" + } + }, + "css": "&{border-left-width:3px;}" + } +} diff --git a/theme.json b/theme.json index a92f5be..0a91e65 100644 --- a/theme.json +++ b/theme.json @@ -433,7 +433,8 @@ "accent-two-light": "var:preset|color|accent-two-100", "accent-three-light": "var:preset|color|accent-three-100", "band-start": "var:preset|color|surface-700", - "band-end": "var:preset|color|surface-300" + "band-end": "var:preset|color|surface-300", + "on-dark-card": "var:preset|color|surface-200" }, "border": { "card": "var:preset|color|neutral-300" From 67897661b7dfe4bbb0f4fcc2a28a45172da531be Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Tue, 7 Jul 2026 15:03:19 +0200 Subject: [PATCH 03/11] ## Fix invalid-content editor errors on CTA patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed `cta-consultation-band.php` gradient background — moved from an unsupported raw inline style to `style.color.gradient`, a properly supported block attribute - Reverted icon usage in both patterns from raw inline SVG (silently stripped by WordPress on save) back to `outermost/icon-block`, using only its supported `iconName`/`width`/`color.text` attributes - Corrected `chat-circle` to the valid Phosphor slug `chat` --- patterns/cta/cta-consultation-band.php | 6 +++--- patterns/cta/cta-consultation-inline.php | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/patterns/cta/cta-consultation-band.php b/patterns/cta/cta-consultation-band.php index ae267fc..cbae908 100644 --- a/patterns/cta/cta-consultation-band.php +++ b/patterns/cta/cta-consultation-band.php @@ -13,8 +13,8 @@ */ ?> - -
+ +
@@ -77,7 +77,7 @@
- +

diff --git a/patterns/cta/cta-consultation-inline.php b/patterns/cta/cta-consultation-inline.php index 6d2e1d9..9601bae 100644 --- a/patterns/cta/cta-consultation-inline.php +++ b/patterns/cta/cta-consultation-inline.php @@ -21,7 +21,11 @@
- + +
+ +
+

From 51ac2969c0a99f9d9fd84405e24b62b473709159 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Tue, 7 Jul 2026 16:35:07 +0200 Subject: [PATCH 04/11] ## Fix icon rendering and validation errors in CTA patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced `outermost/icon-block` usage with CSS `mask-image` spans referencing new SVG assets — the plugin's bundled icon library has no matching icons and self-closing authoring conflicts with its `save()` output for icons that do resolve (e.g. `check`) - Added `assets/icons/check.svg`, `chat.svg`, `star.svg`, `phone.svg` - Fixed invalid `style.css` key on the "or see our work" link — moved its custom properties to a plain wrapping `` --- assets/icons/chat.svg | 1 + assets/icons/check.svg | 1 + assets/icons/phone.svg | 1 + assets/icons/star.svg | 1 + patterns/cta/cta-consultation-band.php | 12 +++++++----- patterns/cta/cta-consultation-inline.php | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 assets/icons/chat.svg create mode 100644 assets/icons/check.svg create mode 100644 assets/icons/phone.svg create mode 100644 assets/icons/star.svg diff --git a/assets/icons/chat.svg b/assets/icons/chat.svg new file mode 100644 index 0000000..99a8020 --- /dev/null +++ b/assets/icons/chat.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/check.svg b/assets/icons/check.svg new file mode 100644 index 0000000..63acbf0 --- /dev/null +++ b/assets/icons/check.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/phone.svg b/assets/icons/phone.svg new file mode 100644 index 0000000..6d1ebe5 --- /dev/null +++ b/assets/icons/phone.svg @@ -0,0 +1 @@ + diff --git a/assets/icons/star.svg b/assets/icons/star.svg new file mode 100644 index 0000000..e544193 --- /dev/null +++ b/assets/icons/star.svg @@ -0,0 +1 @@ + diff --git a/patterns/cta/cta-consultation-band.php b/patterns/cta/cta-consultation-band.php index cbae908..a5cc497 100644 --- a/patterns/cta/cta-consultation-band.php +++ b/patterns/cta/cta-consultation-band.php @@ -54,9 +54,11 @@
- - + + + +
@@ -67,7 +69,7 @@
- +

@@ -77,7 +79,7 @@
- +

@@ -87,7 +89,7 @@
- +

diff --git a/patterns/cta/cta-consultation-inline.php b/patterns/cta/cta-consultation-inline.php index 9601bae..c1c16b2 100644 --- a/patterns/cta/cta-consultation-inline.php +++ b/patterns/cta/cta-consultation-inline.php @@ -23,7 +23,7 @@
- +
From f17721ad876220bcd36ac42892523f87ba068b0e Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Tue, 7 Jul 2026 16:48:15 +0200 Subject: [PATCH 05/11] Replace icon spans with SVGs in consultation patterns for improved rendering --- patterns/cta/cta-consultation-band.php | 16 ++++++++++------ patterns/cta/cta-consultation-inline.php | 4 +++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/patterns/cta/cta-consultation-band.php b/patterns/cta/cta-consultation-band.php index a5cc497..12cc1c4 100644 --- a/patterns/cta/cta-consultation-band.php +++ b/patterns/cta/cta-consultation-band.php @@ -45,7 +45,7 @@ -
+
@@ -54,11 +54,9 @@
- -
@@ -69,7 +67,9 @@
- + + +

@@ -79,7 +79,9 @@
- + + +

@@ -89,7 +91,9 @@
- + + +

diff --git a/patterns/cta/cta-consultation-inline.php b/patterns/cta/cta-consultation-inline.php index c1c16b2..d4b733f 100644 --- a/patterns/cta/cta-consultation-inline.php +++ b/patterns/cta/cta-consultation-inline.php @@ -23,7 +23,9 @@
- + + +
From 254952c5745c0d4e36a406e998bae0d5ec06ebeb Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Wed, 8 Jul 2026 09:09:19 +0200 Subject: [PATCH 06/11] ## Add cta-consultation-strip pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Created `patterns/cta/cta-consultation-strip.php` with icon chip, heading, body copy, and glass-style button - Added `assets/icons/arrow-right.svg` - Reused existing `is-style-glass-card`, `is-style-glass-button`, and `assets/icons/phone.svg` — no new tokens or styles required --- assets/icons/arrow-right.svg | 1 + patterns/cta/cta-consultation-strip.php | 57 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 assets/icons/arrow-right.svg create mode 100644 patterns/cta/cta-consultation-strip.php diff --git a/assets/icons/arrow-right.svg b/assets/icons/arrow-right.svg new file mode 100644 index 0000000..0afaf5d --- /dev/null +++ b/assets/icons/arrow-right.svg @@ -0,0 +1 @@ + diff --git a/patterns/cta/cta-consultation-strip.php b/patterns/cta/cta-consultation-strip.php new file mode 100644 index 0000000..3072206 --- /dev/null +++ b/patterns/cta/cta-consultation-strip.php @@ -0,0 +1,57 @@ + + +
+ + +
+ + +
+ + + +
+ + + +
+ +

+ + + +

+ +
+ +
+ + + +
+ +
+ + + + + +
+ + +
+ From dee5b4b6713e6fa552ba0cd0a4be9192184b1dc5 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Wed, 8 Jul 2026 09:17:25 +0200 Subject: [PATCH 07/11] Refactor CTA button structure and reposition arrow icon for improved layout --- patterns/cta/cta-consultation-strip.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/patterns/cta/cta-consultation-strip.php b/patterns/cta/cta-consultation-strip.php index 3072206..c28be2e 100644 --- a/patterns/cta/cta-consultation-strip.php +++ b/patterns/cta/cta-consultation-strip.php @@ -41,17 +41,19 @@
- -
+
+ +
- - - -
+ + + +
+
From 7faf0a1227a7097c3cb3062a93ac3f55a37c4312 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Wed, 8 Jul 2026 09:28:55 +0200 Subject: [PATCH 08/11] ## Add cta-consultation-reassurance pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Created `patterns/cta/cta-consultation-reassurance.php` with two-column layout, badge, heading, button, and 3-item reassurance list - Reused existing tokens (`surface.on-dark-card`, `text.brand`, `text.on-dark`, `text.on-dark-muted`, `button.fill.text`) and existing icon assets (`check.svg`, `arrow-right.svg`) — no new tokens or assets - Avoided unverified per-side border JSON for row/column dividers, using plain freeform wrapper elements instead to guarantee no validation errors --- patterns/cta/cta-consultation-reassurance.php | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 patterns/cta/cta-consultation-reassurance.php diff --git a/patterns/cta/cta-consultation-reassurance.php b/patterns/cta/cta-consultation-reassurance.php new file mode 100644 index 0000000..0d720c4 --- /dev/null +++ b/patterns/cta/cta-consultation-reassurance.php @@ -0,0 +1,115 @@ + + +
+ + +
+ + +
+ +

+ + + +

+ + + +

+ +
+ + +
+ +
+ +
+ +
+ + + + + +
+
+ + + + + +
+ +
+ +
+ +
+ + + +
+ + + +

+ +
+ +
+ +
+ +
+ +
+ + + +
+ + + +

+ +
+ +
+ + +
+ +
+ + + +
+ + + +

+ +
+ + +
+ + +
+ From aba6e20be33e20b5a66f362630e1154a971ff483 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Wed, 8 Jul 2026 10:01:51 +0200 Subject: [PATCH 09/11] ## Fix button hover states across CTA patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed duplicate arrow on cta-consultation-reassurance — theme already renders one automatically for plain buttons - Added hover/focus rule for the cta-consultation-strip arrow, tied to the shared button wrapper, since it sits outside the button's own rich text - Pinned fill-button text/icon colour to `text.on-dark` for cta-consultation-band, cta-consultation-inline, and cta-consultation-reassurance buttons, fixing unreadable hover text on fixed-dark cards - Fixed in `src/scss/animations/_button-motion.scss` (source) and recompiled `assets/css/animations.css` via `npm run build:css` --- assets/css/animations.css | 31 ++++++++++++++++ patterns/cta/cta-consultation-reassurance.php | 6 --- src/scss/animations/_button-motion.scss | 37 +++++++++++++++++++ 3 files changed, 68 insertions(+), 6 deletions(-) diff --git a/assets/css/animations.css b/assets/css/animations.css index 920b401..252cfab 100644 --- a/assets/css/animations.css +++ b/assets/css/animations.css @@ -1009,6 +1009,30 @@ color: var(--ls-button-arrow-compact-colour-active); } +/* CTA fill buttons on fixed-dark cards: pin text/icon colour to the on-dark + tokens so the fill button's rest and hover states stay readable regardless + of the site's light/dark style variation. */ +.ls-cta-band__button .wp-block-button__link, +.ls-cta-inline__button .wp-block-button__link, +.ls-cta-reassurance__button .wp-block-button__link { + color: var(--wp--custom--color--text--on-dark); + --ls-button-fill-icon-colour: var(--wp--custom--color--text--on-dark); + --ls-button-fill-hover-text: var(--wp--custom--color--text--on-dark); +} + +/* CTA strip: the arrow sits next to the glass button rather than nested in + its rich text, so it needs its own hover contract tied to the shared + wrapper. */ +.ls-cta-strip__button-arrow { + transition: transform var(--wp--custom--animation--duration--base) var(--wp--custom--animation--easing--emphasised), color var(--wp--custom--animation--duration--base) var(--wp--custom--animation--easing--standard); +} + +.ls-cta-strip__cta-wrap:hover .ls-cta-strip__button-arrow, +.ls-cta-strip__cta-wrap:focus-within .ls-cta-strip__button-arrow { + color: var(--wp--custom--color--text--brand); + transform: translateX(0.25em); +} + @media (prefers-reduced-motion: reduce) { .wp-block-button.is-style-glass-button .wp-block-button__link, .wp-block-button.is-style-button-arrow-compact .wp-block-button__link, @@ -1027,4 +1051,11 @@ :is(.is-style-card-solutions, .is-style-card-solutions-accent):focus-within .wp-block-button.is-style-button-arrow-compact .wp-block-button__link::after { transform: none; } + .ls-cta-strip__button-arrow { + transition: none; + } + .ls-cta-strip__cta-wrap:hover .ls-cta-strip__button-arrow, + .ls-cta-strip__cta-wrap:focus-within .ls-cta-strip__button-arrow { + transform: none; + } } diff --git a/patterns/cta/cta-consultation-reassurance.php b/patterns/cta/cta-consultation-reassurance.php index 0d720c4..cb4f737 100644 --- a/patterns/cta/cta-consultation-reassurance.php +++ b/patterns/cta/cta-consultation-reassurance.php @@ -35,7 +35,6 @@
-
@@ -43,11 +42,6 @@
- - - - -
diff --git a/src/scss/animations/_button-motion.scss b/src/scss/animations/_button-motion.scss index 8ea4a28..16e95a8 100644 --- a/src/scss/animations/_button-motion.scss +++ b/src/scss/animations/_button-motion.scss @@ -486,6 +486,34 @@ } } +/* CTA fill buttons on fixed-dark cards: pin text/icon colour to the on-dark + tokens so the fill button's rest and hover states stay readable regardless + of the site's light/dark style variation. */ +.ls-cta-band__button .wp-block-button__link, +.ls-cta-inline__button .wp-block-button__link, +.ls-cta-reassurance__button .wp-block-button__link { + color: var(--wp--custom--color--text--on-dark); + --ls-button-fill-icon-colour: var(--wp--custom--color--text--on-dark); + --ls-button-fill-hover-text: var(--wp--custom--color--text--on-dark); +} + +/* CTA strip: the arrow sits next to the glass button rather than nested in + its rich text, so it needs its own hover contract tied to the shared + wrapper. */ +.ls-cta-strip__button-arrow { + transition: + transform var(--wp--custom--animation--duration--base) + var(--wp--custom--animation--easing--emphasised), + color var(--wp--custom--animation--duration--base) + var(--wp--custom--animation--easing--standard); +} + +.ls-cta-strip__cta-wrap:hover .ls-cta-strip__button-arrow, +.ls-cta-strip__cta-wrap:focus-within .ls-cta-strip__button-arrow { + color: var(--wp--custom--color--text--brand); + transform: translateX(0.25em); +} + @include motion.reduced-motion { .wp-block-button.is-style-glass-button .wp-block-button__link, .wp-block-button.is-style-button-arrow-compact .wp-block-button__link, @@ -510,4 +538,13 @@ .wp-block-button__link::after { transform: none; } + + .ls-cta-strip__button-arrow { + transition: none; + } + + .ls-cta-strip__cta-wrap:hover .ls-cta-strip__button-arrow, + .ls-cta-strip__cta-wrap:focus-within .ls-cta-strip__button-arrow { + transform: none; + } } \ No newline at end of file From b69c889e4756d8b3c24446cc6a920f18b0826f5c Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Wed, 8 Jul 2026 10:39:14 +0200 Subject: [PATCH 10/11] ## Address Gemini code review feedback on CTA patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced raw-div dividers in cta-consultation-reassurance with native per-side `border.bottom` block styles, verified against WordPress core's border support - Added missing `aria-hidden="true"` to the decorative divider span - Replaced raw-div button/arrow wrapper in cta-consultation-strip with a native `wp:group`, moving positioning into `src/scss/animations/_button-motion.scss` and recompiling `assets/css/animations.css` - Rejected 2 suggested `fontSize` changes (`x-small`/`large`) — verified against `typography.json` that they aren't real presets in this theme --- assets/css/animations.css | 5 +++++ patterns/cta/cta-consultation-reassurance.php | 14 +++++--------- patterns/cta/cta-consultation-strip.php | 4 +++- src/scss/animations/_button-motion.scss | 5 +++++ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/assets/css/animations.css b/assets/css/animations.css index 252cfab..721103b 100644 --- a/assets/css/animations.css +++ b/assets/css/animations.css @@ -1023,6 +1023,11 @@ /* CTA strip: the arrow sits next to the glass button rather than nested in its rich text, so it needs its own hover contract tied to the shared wrapper. */ +.ls-cta-strip__cta-wrap { + position: relative; + display: inline-flex; +} + .ls-cta-strip__button-arrow { transition: transform var(--wp--custom--animation--duration--base) var(--wp--custom--animation--easing--emphasised), color var(--wp--custom--animation--duration--base) var(--wp--custom--animation--easing--standard); } diff --git a/patterns/cta/cta-consultation-reassurance.php b/patterns/cta/cta-consultation-reassurance.php index cb4f737..b130c3f 100644 --- a/patterns/cta/cta-consultation-reassurance.php +++ b/patterns/cta/cta-consultation-reassurance.php @@ -45,14 +45,13 @@ - +
-
- -
+ +
@@ -66,11 +65,9 @@
-
-
- -
+ +
@@ -84,7 +81,6 @@
-
diff --git a/patterns/cta/cta-consultation-strip.php b/patterns/cta/cta-consultation-strip.php index c28be2e..bff01f9 100644 --- a/patterns/cta/cta-consultation-strip.php +++ b/patterns/cta/cta-consultation-strip.php @@ -41,7 +41,8 @@
-
+ +
@@ -54,6 +55,7 @@
+
diff --git a/src/scss/animations/_button-motion.scss b/src/scss/animations/_button-motion.scss index 16e95a8..f8d0406 100644 --- a/src/scss/animations/_button-motion.scss +++ b/src/scss/animations/_button-motion.scss @@ -500,6 +500,11 @@ /* CTA strip: the arrow sits next to the glass button rather than nested in its rich text, so it needs its own hover contract tied to the shared wrapper. */ +.ls-cta-strip__cta-wrap { + position: relative; + display: inline-flex; +} + .ls-cta-strip__button-arrow { transition: transform var(--wp--custom--animation--duration--base) From 9e531aced051b7accb6fc61a140c36a72b5bfdb7 Mon Sep 17 00:00:00 2001 From: Brandonma21 Date: Wed, 8 Jul 2026 10:52:35 +0200 Subject: [PATCH 11/11] ## Address CodeRabbit review feedback on CTA patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed inline custom properties on cta-consultation-band's `.ls-cta-band__actions` wrapper not being reflected in block JSON, which would break on save — moved to `src/scss/animations/_button-motion.scss` - Fixed WCAG contrast failure (~1.23:1) on CTA fill buttons by also pinning the background to `surface.on-dark-card`, ensuring readable text in both rest and hover states - Recompiled `assets/css/animations.css` via `npm run build:css` - Confirmed 2 other flagged findings were already resolved by the previous review round; skipped 1 low-value nitpick per CodeRabbit's own priority rating --- assets/css/animations.css | 13 ++++++++++++- patterns/cta/cta-consultation-band.php | 2 +- src/scss/animations/_button-motion.scss | 13 ++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/assets/css/animations.css b/assets/css/animations.css index 721103b..91e5940 100644 --- a/assets/css/animations.css +++ b/assets/css/animations.css @@ -1011,15 +1011,26 @@ /* CTA fill buttons on fixed-dark cards: pin text/icon colour to the on-dark tokens so the fill button's rest and hover states stay readable regardless - of the site's light/dark style variation. */ + of the site's light/dark style variation. The background is also pinned to + a dark surface token — text--on-dark against the default brand/cta fill + colour fails WCAG contrast (~1.2:1) once the fill fully reveals on hover. */ .ls-cta-band__button .wp-block-button__link, .ls-cta-inline__button .wp-block-button__link, .ls-cta-reassurance__button .wp-block-button__link { color: var(--wp--custom--color--text--on-dark); + --ls-button-fill-background: var(--wp--custom--color--surface--on-dark-card); --ls-button-fill-icon-colour: var(--wp--custom--color--text--on-dark); --ls-button-fill-hover-text: var(--wp--custom--color--text--on-dark); } +/* CTA band: the secondary link's arrow colours aren't part of the group's + saved block attributes, so they're defined here instead of as an inline + style on the wrapper (which would be dropped on save). */ +.ls-cta-band__actions { + --ls-link-arrow-colour: var(--wp--custom--color--text--on-dark); + --ls-link-arrow-hover-colour: var(--wp--custom--color--text--brand); +} + /* CTA strip: the arrow sits next to the glass button rather than nested in its rich text, so it needs its own hover contract tied to the shared wrapper. */ diff --git a/patterns/cta/cta-consultation-band.php b/patterns/cta/cta-consultation-band.php index 12cc1c4..6a6da61 100644 --- a/patterns/cta/cta-consultation-band.php +++ b/patterns/cta/cta-consultation-band.php @@ -45,7 +45,7 @@ -
+
diff --git a/src/scss/animations/_button-motion.scss b/src/scss/animations/_button-motion.scss index f8d0406..2db0818 100644 --- a/src/scss/animations/_button-motion.scss +++ b/src/scss/animations/_button-motion.scss @@ -488,15 +488,26 @@ /* CTA fill buttons on fixed-dark cards: pin text/icon colour to the on-dark tokens so the fill button's rest and hover states stay readable regardless - of the site's light/dark style variation. */ + of the site's light/dark style variation. The background is also pinned to + a dark surface token — text--on-dark against the default brand/cta fill + colour fails WCAG contrast (~1.2:1) once the fill fully reveals on hover. */ .ls-cta-band__button .wp-block-button__link, .ls-cta-inline__button .wp-block-button__link, .ls-cta-reassurance__button .wp-block-button__link { color: var(--wp--custom--color--text--on-dark); + --ls-button-fill-background: var(--wp--custom--color--surface--on-dark-card); --ls-button-fill-icon-colour: var(--wp--custom--color--text--on-dark); --ls-button-fill-hover-text: var(--wp--custom--color--text--on-dark); } +/* CTA band: the secondary link's arrow colours aren't part of the group's + saved block attributes, so they're defined here instead of as an inline + style on the wrapper (which would be dropped on save). */ +.ls-cta-band__actions { + --ls-link-arrow-colour: var(--wp--custom--color--text--on-dark); + --ls-link-arrow-hover-colour: var(--wp--custom--color--text--brand); +} + /* CTA strip: the arrow sits next to the glass button rather than nested in its rich text, so it needs its own hover contract tied to the shared wrapper. */