diff --git a/CHANGELOG.md b/CHANGELOG.md index 718d1c2e..f4c2ebda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [Unreleased] — Migrate Services patterns to the Core Icon block (LS-3229) + +### Changed + +- Replaced `outermost/icon-block` (third-party "Icon Block" plugin) with WordPress 7.1's native Core Icon block (`core/icon`) across the 3 Services page patterns — `patterns/hero/services-hero.php`, `patterns/sections/services-linked-decisions.php`, `patterns/sections/services-service-clusters.php` — referencing icons from the `lightspeed` collection registered in `ls-plugin`. Final batch of the Core Icon block migration (LS-3229). +- Converted the PHP icon arrays in these files (per-service, per-cluster, per-step) from raw inline SVG to bare `lightspeed/{name}` slugs, and rewrote their loop templates to emit `core/icon` block markup dynamically per iteration, removing the now-unused raw-SVG helper variables. + +See [PR #50](https://github.com/lightspeedwp/ls-theme/pull/50). + +--- + ## [Unreleased] — Fix legacy outermost/icon-block CSS selectors broken by Core Icon migration (LS-3720) ### Fixed diff --git a/assets/css/services-hero.css b/assets/css/services-hero.css index 3c509ecc..5f8ea775 100644 --- a/assets/css/services-hero.css +++ b/assets/css/services-hero.css @@ -1 +1 @@ -.ls-service-pill{position:relative;transition:background-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),border-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),transform var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),box-shadow var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard)}.ls-service-pill:hover,.ls-service-pill:focus-within{transform:translateY(-1px);box-shadow:var(--wp--custom--shadow--elevation--100)}.ls-service-pill a::before{content:"";position:absolute;inset:0;z-index:var(--wp--custom--z-index--base)}.ls-service-pill a:focus-visible{outline:2px solid var(--wp--custom--color--focus--ring);outline-offset:2px;border-radius:var(--wp--preset--border-radius--100)}.ls-service-pill--discover:hover,.ls-service-pill--discover:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 16%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 55%, var(--wp--custom--color--border--card)) !important}.ls-service-pill--create:hover,.ls-service-pill--create:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 16%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 55%, var(--wp--custom--color--border--card)) !important}.ls-service-pill--build:hover,.ls-service-pill--build:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 16%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 55%, var(--wp--custom--color--border--card)) !important}.ls-service-pill--launch:hover,.ls-service-pill--launch:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 16%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 55%, var(--wp--custom--color--border--card)) !important}.ls-service-pill--grow:hover,.ls-service-pill--grow:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 16%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 55%, var(--wp--custom--color--border--card)) !important}.ls-service-pill--evolve:hover,.ls-service-pill--evolve:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 16%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 55%, var(--wp--custom--color--border--card)) !important}@media(prefers-reduced-motion: reduce){.ls-service-pill{transition:none}.ls-service-pill:hover,.ls-service-pill:focus-within{transform:none}} +.ls-service-pill{position:relative;transition:background-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),border-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),transform var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),box-shadow var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard)}.ls-service-pill:hover,.ls-service-pill:focus-within{transform:translateY(-1px);box-shadow:var(--wp--custom--shadow--elevation--100)}.ls-service-pill a::before{content:"";position:absolute;inset:0;z-index:var(--wp--custom--z-index--base)}.ls-service-pill a:focus-visible{outline:2px solid var(--wp--custom--color--focus--ring);outline-offset:2px;border-radius:var(--wp--preset--border-radius--100)}.ls-service-pill--discover{background-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 8%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 35%, var(--wp--custom--color--border--card))}.ls-service-pill--discover:hover,.ls-service-pill--discover:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 16%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 55%, var(--wp--custom--color--border--card))}.ls-service-pill--create{background-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 8%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 35%, var(--wp--custom--color--border--card))}.ls-service-pill--create:hover,.ls-service-pill--create:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 16%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 55%, var(--wp--custom--color--border--card))}.ls-service-pill--build{background-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 8%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 35%, var(--wp--custom--color--border--card))}.ls-service-pill--build:hover,.ls-service-pill--build:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 16%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 55%, var(--wp--custom--color--border--card))}.ls-service-pill--launch{background-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 8%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 35%, var(--wp--custom--color--border--card))}.ls-service-pill--launch:hover,.ls-service-pill--launch:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 16%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 55%, var(--wp--custom--color--border--card))}.ls-service-pill--grow{background-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 8%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 35%, var(--wp--custom--color--border--card))}.ls-service-pill--grow:hover,.ls-service-pill--grow:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 16%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 55%, var(--wp--custom--color--border--card))}.ls-service-pill--evolve{background-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 8%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 35%, var(--wp--custom--color--border--card))}.ls-service-pill--evolve:hover,.ls-service-pill--evolve:focus-within{background-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 16%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 55%, var(--wp--custom--color--border--card))}@media(prefers-reduced-motion: reduce){.ls-service-pill{transition:none}.ls-service-pill:hover,.ls-service-pill:focus-within{transform:none}} diff --git a/assets/css/services-linked-decisions.css b/assets/css/services-linked-decisions.css index 2a5f24b6..e5abbf7a 100644 --- a/assets/css/services-linked-decisions.css +++ b/assets/css/services-linked-decisions.css @@ -1 +1 @@ -.ls-process-pill{position:relative;transition:border-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),transform var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),box-shadow var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard)}.ls-process-pill:hover,.ls-process-pill:focus-within{border-color:var(--wp--custom--color--border--field) !important;transform:translateY(-1px);box-shadow:var(--wp--custom--shadow--elevation--100)}.ls-process-pill .ls-process-pill__label a::before{content:"";position:absolute;inset:0;z-index:var(--wp--custom--z-index--base)}.ls-process-pill .ls-process-pill__label a:focus-visible{outline:2px solid var(--wp--custom--color--focus--ring);outline-offset:2px;border-radius:var(--wp--preset--border-radius--100)}.ls-process-pill .ls-process-pill__badge{transition:background-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),border-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard)}.ls-process-pill--discover:hover .ls-process-pill__badge,.ls-process-pill--discover:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 20%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 50%, transparent) !important}.ls-process-pill--create:hover .ls-process-pill__badge,.ls-process-pill--create:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 20%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 50%, transparent) !important}.ls-process-pill--build:hover .ls-process-pill__badge,.ls-process-pill--build:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 20%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 50%, transparent) !important}.ls-process-pill--launch:hover .ls-process-pill__badge,.ls-process-pill--launch:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 20%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 50%, transparent) !important}.ls-process-pill--grow:hover .ls-process-pill__badge,.ls-process-pill--grow:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 20%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 50%, transparent) !important}.ls-process-pill--evolve:hover .ls-process-pill__badge,.ls-process-pill--evolve:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 20%, transparent) !important;border-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 50%, transparent) !important}@media(prefers-reduced-motion: reduce){.ls-process-pill{transition:none}.ls-process-pill:hover,.ls-process-pill:focus-within{transform:none}.ls-process-pill__badge{transition:none}} +.ls-process-pill{position:relative;transition:border-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),transform var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),box-shadow var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard)}.ls-process-pill:hover,.ls-process-pill:focus-within{border-color:var(--wp--custom--color--border--field) !important;transform:translateY(-1px);box-shadow:var(--wp--custom--shadow--elevation--100)}.ls-process-pill .ls-process-pill__label a::before{content:"";position:absolute;inset:0;z-index:var(--wp--custom--z-index--base)}.ls-process-pill .ls-process-pill__label a:focus-visible{outline:2px solid var(--wp--custom--color--focus--ring);outline-offset:2px;border-radius:var(--wp--preset--border-radius--100)}.ls-process-pill .ls-process-pill__badge{transition:background-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard),border-color var(--wp--custom--animation--duration--responsive) var(--wp--custom--animation--easing--standard)}.ls-process-pill--discover .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 10%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 30%, transparent)}.ls-process-pill--discover:hover .ls-process-pill__badge,.ls-process-pill--discover:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 20%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--discover) 50%, transparent)}.ls-process-pill--create .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 10%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 30%, transparent)}.ls-process-pill--create:hover .ls-process-pill__badge,.ls-process-pill--create:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 20%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--create) 50%, transparent)}.ls-process-pill--build .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 10%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 30%, transparent)}.ls-process-pill--build:hover .ls-process-pill__badge,.ls-process-pill--build:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 20%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--build) 50%, transparent)}.ls-process-pill--launch .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 10%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 30%, transparent)}.ls-process-pill--launch:hover .ls-process-pill__badge,.ls-process-pill--launch:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 20%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--launch) 50%, transparent)}.ls-process-pill--grow .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 10%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 30%, transparent)}.ls-process-pill--grow:hover .ls-process-pill__badge,.ls-process-pill--grow:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 20%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--grow) 50%, transparent)}.ls-process-pill--evolve .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 10%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 30%, transparent)}.ls-process-pill--evolve:hover .ls-process-pill__badge,.ls-process-pill--evolve:focus-within .ls-process-pill__badge{background-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 20%, transparent);border-color:color-mix(in srgb, var(--wp--custom--color--phase--evolve) 50%, transparent)}@media(prefers-reduced-motion: reduce){.ls-process-pill{transition:none}.ls-process-pill:hover,.ls-process-pill:focus-within{transform:none}.ls-process-pill__badge{transition:none}} diff --git a/patterns/hero/services-hero.php b/patterns/hero/services-hero.php index 9c4fe2ab..fd17d756 100644 --- a/patterns/hero/services-hero.php +++ b/patterns/hero/services-hero.php @@ -17,85 +17,85 @@ 'label' => __( 'Discovery', 'ls-theme' ), 'url' => '/services/discovery/', 'phase' => 'discover', - 'icon' => '', + 'icon' => 'search', ), array( 'label' => __( 'Content', 'ls-theme' ), 'url' => '/services/content/', 'phase' => 'create', - 'icon' => '', + 'icon' => 'file-text', ), array( 'label' => __( 'Design', 'ls-theme' ), 'url' => '/services/design/', 'phase' => 'create', - 'icon' => '', + 'icon' => 'paint-brush', ), array( 'label' => __( 'Development', 'ls-theme' ), 'url' => '/services/development/', 'phase' => 'build', - 'icon' => '', + 'icon' => 'code', ), array( 'label' => __( 'Migrations', 'ls-theme' ), 'url' => '/services/migrations/', 'phase' => 'build', - 'icon' => '', + 'icon' => 'arrows-left-right', ), array( 'label' => __( 'Hosting', 'ls-theme' ), 'url' => '/services/hosting/', 'phase' => 'launch', - 'icon' => '', + 'icon' => 'cloud', ), array( 'label' => __( 'Performance', 'ls-theme' ), 'url' => '/services/performance/', 'phase' => 'launch', - 'icon' => '', + 'icon' => 'gauge', ), array( 'label' => __( 'Security', 'ls-theme' ), 'url' => '/services/security/', 'phase' => 'launch', - 'icon' => '', + 'icon' => 'shield', ), array( 'label' => __( 'Training', 'ls-theme' ), 'url' => '/services/training/', 'phase' => 'launch', - 'icon' => '', + 'icon' => 'graduation-cap', ), array( 'label' => __( 'Support', 'ls-theme' ), 'url' => '/services/support/', 'phase' => 'grow', - 'icon' => '', + 'icon' => 'lifebuoy', ), array( 'label' => __( 'SEO', 'ls-theme' ), 'url' => '/services/seo/', 'phase' => 'grow', - 'icon' => '', + 'icon' => 'chart-line-up', ), array( 'label' => __( 'Accessibility', 'ls-theme' ), 'url' => '/services/accessibility/', 'phase' => 'grow', - 'icon' => '', + 'icon' => 'wheelchair', ), array( 'label' => __( 'Email marketing', 'ls-theme' ), 'url' => '/services/email-marketing/', 'phase' => 'grow', - 'icon' => '', + 'icon' => 'envelope', ), array( 'label' => __( 'AI', 'ls-theme' ), 'url' => '/services/ai/', 'phase' => 'evolve', - 'icon' => '', + 'icon' => 'special-interests', ), ); ?> @@ -111,9 +111,7 @@
- -
- +

@@ -157,14 +155,10 @@ foreach ( $ls_services_hero_tags as $ls_tag ) : $ls_phase_color = 'var(--wp--custom--color--phase--' . $ls_tag['phase'] . ')'; $ls_pill_class = 'ls-service-pill ls-service-pill--' . $ls_tag['phase']; - $ls_pill_border = 'color-mix(in srgb, ' . $ls_phase_color . ' 35%, var(--wp--custom--color--border--card))'; - $ls_pill_bg = 'color-mix(in srgb, ' . $ls_phase_color . ' 8%, transparent)'; ?> - -
- -
- + +
+

diff --git a/patterns/sections/services-linked-decisions.php b/patterns/sections/services-linked-decisions.php index da96f42d..c27ba77a 100644 --- a/patterns/sections/services-linked-decisions.php +++ b/patterns/sections/services-linked-decisions.php @@ -50,8 +50,6 @@ 'url' => '/services/evolve/', ), ); - -$ls_step_arrow_icon = ''; ?>
@@ -67,9 +65,7 @@
- -
- +

@@ -99,15 +95,13 @@ $ls_step ) : $ls_step_phase_color = 'var(--wp--custom--color--phase--' . $ls_step['phase'] . ')'; - $ls_badge_bg = 'color-mix(in srgb, ' . $ls_step_phase_color . ' 10%, transparent)'; - $ls_badge_border = 'color-mix(in srgb, ' . $ls_step_phase_color . ' 30%, transparent)'; $ls_pill_class = 'ls-process-pill ls-process-pill--' . $ls_step['phase']; ?>
- -

+ +

@@ -117,9 +111,7 @@ - -
- + diff --git a/patterns/sections/services-service-clusters.php b/patterns/sections/services-service-clusters.php index a21059fc..895fda07 100644 --- a/patterns/sections/services-service-clusters.php +++ b/patterns/sections/services-service-clusters.php @@ -12,19 +12,17 @@ * @package ls-theme */ -$ls_arrow_icon = ''; - $ls_service_icons = array( - 'discovery' => '', - 'content' => '', - 'design' => '', - 'development' => '', - 'migrations' => '', - 'hosting' => '', - 'training' => '', - 'support' => '', - 'ai' => '', - 'seo' => '', + 'discovery' => 'search', + 'content' => 'file-text', + 'design' => 'paint-brush', + 'development' => 'code', + 'migrations' => 'arrows-left-right', + 'hosting' => 'cloud', + 'training' => 'graduation-cap', + 'support' => 'lifebuoy', + 'ai' => 'sparkle', + 'seo' => 'chart-line-up', ); $ls_service_urls = array( @@ -56,35 +54,35 @@ $ls_clusters = array( array( 'index' => '01', - 'icon' => '', + 'icon' => 'search', 'title' => __( 'Discovery and content', 'ls-theme' ), 'description' => __( 'For scope clarity, content structure, risk reduction and better planning before design or build decisions harden.', 'ls-theme' ), 'tags' => array( 'discovery', 'content' ), ), array( 'index' => '02', - 'icon' => '', + 'icon' => 'paint-brush', 'title' => __( 'Design systems and accessibility', 'ls-theme' ), 'description' => __( 'For clearer interfaces, stronger consistency and more maintainable design-to-development translation.', 'ls-theme' ), 'tags' => array( 'design' ), ), array( 'index' => '03', - 'icon' => '', + 'icon' => 'code', 'title' => __( 'Engineering and migrations', 'ls-theme' ), 'description' => __( 'For custom WordPress work, integrations, migrations and cleaner long-term architecture.', 'ls-theme' ), 'tags' => array( 'development', 'migrations' ), ), array( 'index' => '04', - 'icon' => '', + 'icon' => 'rocket', 'title' => __( 'Launch and infrastructure', 'ls-theme' ), 'description' => __( 'For hosting, readiness, security-minded thinking and performance-aware go-live planning.', 'ls-theme' ), 'tags' => array( 'hosting', 'training' ), ), array( 'index' => '05', - 'icon' => '', + 'icon' => 'question', 'title' => __( 'Support and optimisation', 'ls-theme' ), 'description' => __( 'For maintenance, issue resolution, performance review, training and long-term platform continuity.', 'ls-theme' ), 'tags' => array( 'support', 'ai', 'seo' ), @@ -99,7 +97,7 @@ * * @param array $ls_cluster Cluster data (index, icon, title, description, tags). */ -$ls_render_cluster = function ( $ls_cluster ) use ( $ls_service_icons, $ls_service_urls, $ls_service_labels, $ls_arrow_icon ) { +$ls_render_cluster = function ( $ls_cluster ) use ( $ls_service_icons, $ls_service_urls, $ls_service_labels ) { ?>
@@ -108,9 +106,7 @@
- -
- +
@@ -138,17 +134,13 @@
- -
- +

- -
- +
@@ -173,9 +165,7 @@
- -
- +

diff --git a/src/scss/structural/services-hero.scss b/src/scss/structural/services-hero.scss index 24647ca2..318917bc 100644 --- a/src/scss/structural/services-hero.scss +++ b/src/scss/structural/services-hero.scss @@ -53,17 +53,24 @@ @each $phase in discover, create, build, launch, grow, evolve { .ls-service-pill--#{$phase} { - // JSON limitation: same :hover/:focus-within gap as above. The `!important` here is also - // required, separately: background-color/border-color are set inline per instance at rest - // (colour-mix over each pill's own phase token, itself a JSON limitation — six distinct - // phase-derived tints have no theme.json key), and an inline style attribute always - // outranks an external stylesheet rule regardless of pseudo-class or specificity, so - // without !important these two properties could never change on hover. transform/ - // box-shadow aren't set inline at rest, so they don't need it. + // JSON limitation, moved here from an inline block style attribute (LS-1598 editor + // validation fix): WordPress's style engine (wp_style_engine_get_styles(), shared by both + // server rendering and the block editor's own re-serialization used for validation) silently + // drops border-color/background-color values that are color-mix() functions — confirmed via + // wp_style_engine_get_styles() directly returning CSS with those two properties missing. + // Since the editor compares its regenerated HTML against the stored HTML byte-for-byte, a + // color-mix() value in a block's JSON style attribute makes that block permanently fail + // validation ("Block contains unexpected or invalid content"), even though it renders fine + // on the front end. Rest-state colours now live here, keyed off the existing per-phase + // className, instead of in JSON. No !important needed here since this is no longer + // competing with an inline style attribute. + background-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 8%, transparent); + border-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 35%, var(--wp--custom--color--border--card)); + &:hover, &:focus-within { - background-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 16%, transparent) !important; - border-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 55%, var(--wp--custom--color--border--card)) !important; + background-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 16%, transparent); + border-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 55%, var(--wp--custom--color--border--card)); } } } diff --git a/src/scss/structural/services-linked-decisions.scss b/src/scss/structural/services-linked-decisions.scss index c5a5daf8..e2464402 100644 --- a/src/scss/structural/services-linked-decisions.scss +++ b/src/scss/structural/services-linked-decisions.scss @@ -64,17 +64,27 @@ @each $phase in discover, create, build, launch, grow, evolve { .ls-process-pill--#{$phase} { - // JSON limitation: same :hover/:focus-within gap as above. The `!important` here is also - // required, separately: the badge's background-color/border-color are set inline per - // instance at rest (colour-mix over each pill's own phase token, itself a JSON - // limitation — six distinct phase-derived tints have no theme.json key), and an inline - // style attribute always outranks an external stylesheet rule regardless of pseudo-class, - // so without !important these two properties could never change on hover. + // JSON limitation, moved here from an inline block style attribute (LS-1598 editor + // validation fix): WordPress's style engine (wp_style_engine_get_styles(), shared by both + // server rendering and the block editor's own re-serialization used for validation) silently + // drops border-color/background-color values that are color-mix() functions — confirmed via + // wp_style_engine_get_styles() directly returning CSS with those two properties missing. + // Since the editor compares its regenerated HTML against the stored HTML byte-for-byte, a + // color-mix() value in a block's JSON style attribute makes that block permanently fail + // validation ("Block contains unexpected or invalid content"), even though it renders fine + // on the front end. Rest-state badge colours now live here, keyed off the existing per- + // phase className, instead of in JSON. No !important needed here since this is no longer + // competing with an inline style attribute. + .ls-process-pill__badge { + background-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 10%, transparent); + border-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 30%, transparent); + } + &:hover, &:focus-within { .ls-process-pill__badge { - background-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 20%, transparent) !important; - border-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 50%, transparent) !important; + background-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 20%, transparent); + border-color: color-mix(in srgb, var(--wp--custom--color--phase--#{$phase}) 50%, transparent); } } }