Skip to content

Move structural CSS into JSON/block supports (LS-2340) - #23

Merged
brandonmarshal merged 10 commits into
developfrom
feature/ls-2340-phase-3-move-structural-css-into-jsonblock-supports
Aug 13, 2026
Merged

Move structural CSS into JSON/block supports (LS-2340)#23
brandonmarshal merged 10 commits into
developfrom
feature/ls-2340-phase-3-move-structural-css-into-jsonblock-supports

Conversation

@brandonmarshal

@brandonmarshal brandonmarshal commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates structural (non-motion) CSS out of src/scss/animations/** into theme.json/styles/** JSON block-style partials, across 9 work groups. assets/css/animations.css: 2,003 → 1,444 lines (~28%).

Group 1 — Mobile menu + home hero (POC)

  • Migrated _mobile-menu-motion.scss + _home-hero-section.scss structural CSS to JSON
  • Established the core JSON limitations used as precedent for every later group (:where() zero specificity, @media stripped from the css field, comma-separated selectors breaking)

Group 2 — Card motion

  • Migrated _card-motion.scss structural CSS to JSON across 12+ card patterns
  • Kept the WooCommerce card-banner-tint/badge-brand lockstep pair in sync with their -woocommerce variants
  • Fixed a position: relative/overflow: hidden regression (Card Services gradient bar rendering outside its rounded corners) and a WooCommerce card render-order bug

Group 3 — Footer + menu

  • Migrated _footer-motion.scss to JSON; left _menu-motion.scss almost entirely in Sass (confirmed everything in it hits a real limitation)
  • Fixed two mobile bugs found in QA: footer proof-stat cards now stay in one row instead of stacking, and the footer's 5 nav categories now render 2-per-row instead of 1-per-row

Group 4 — Buttons

  • Migrated _button-motion.scss structural CSS to JSON (shared shell, Glass Button, Button Arrow Compact)
  • Inlined the 4 CTA-consultation patterns' on-dark colour pinning instead of leaving it in shared SCSS
  • Fixed a selector-scoping bug caught in manual QA: a JSON css field targeted & .wp-block-button__link when & already was the link, silently dropping position: relative and letting a hover reveal escape its container

Group 5 — Details + header

  • Migrated _details-motion.scss + _header-motion.scss to JSON
  • Inlined the mq() mixin's last 2 call-sites as literal @media breakpoints

Group 6 — Links

  • Migrated _link-motion.scss's one live selector (link-arrow-accent) to JSON

Group 7 — Mixin teardown

  • Deleted _mq.scss, _breakpoints-theme.scss, _glass.scss outright; inlined every remaining motion/surface mixin call-site as literal CSS
  • Removed the now-unneeded sync:breakpoints npm script and its theme-utils.mjs implementation
  • _motion.scss/_surface.scss intentionally kept — their only remaining consumer is the dead gsap/_card-spotlight.scss (LS-2341)

Group 8 — Enqueue gating

  • Investigated inc/animations.php, no code change — every front-end template needs it via header+footer template parts, so there's no further gating opportunity beyond LS-2339

Group 9 — Recompile, duplicate cleanup, and verify

  • Consolidated 3 groups of duplicated hover/motion rules (icon-button hover, mega-menu-item hover, glass @supports blur) into a new shared partial, _shared-hover.scss
  • Full code-review pass across every commit — found and fixed 1 real bug: the consolidation above had silently swapped :focus-visible for :focus-within on 2 of 4 merged selectors
  • Final rebuild, CHANGELOG.md entry, acceptance criteria checked off

Also fixed along the way

  • inc/portfolio-card-colors.php: WooCommerce card-colour swap now runs on render_block_data instead of render_block, fixing a render-order bug where the swap happened after WordPress had already decided which CSS to generate

Deliberately untouched (tracked on LS-2341)

is-style-button-glow-accent, is-style-header-icon-button, is-style-link-underline-accent, is-style-card-solutions-accent, gsap/_card-spotlight.scss — all confirmed dead selectors/files, 0 consumers.

Test plan

  • npm run build:css compiles clean with no errors
  • Manual browser verification of every migrated component across all 9 work groups (buttons, cards, footer, header, mega menu, mobile menu, details/accordion, links) — no visual/behavioral regression
  • inc/animations.php enqueue gating investigated — confirmed already correctly scoped given every front-end template needs it via header+footer template parts; no code change required
  • WooCommerce-tagged Portfolio card lockstep pair verified on a live Work archive post
  • Full code-review pass across every commit on this branch — 1 real bug found and fixed (a hover-consolidation step had silently changed :focus-visible to :focus-within on 2 of 4 merged selectors)
  • Reduced-motion (prefers-reduced-motion: reduce) spot-checked across affected components

Closes LS-2340.

Summary by CodeRabbit

  • New Features

    • Added reusable card icon shells, improved card layouts, spacing, and full-card interactions.
    • Added responsive Services mega-menu and mobile-menu grids with improved link styling.
    • Added footer navigation grids and improved social icon sizing.
    • Added refined glass, button, accordion, hero, and hover styling.
    • Added smoother card, menu, and button animations with reduced-motion support.
  • Bug Fixes

    • Corrected portfolio card color styling so variations display consistently.

Phase 3 Group 1 (LS-2340): moved _mobile-menu-motion.scss and
_home-hero-section.scss's structural rules into styles/**.json,
keeping only what JSON genuinely can't express.

Fixes along the way:
- Accordion rows had mismatched padding/font vs plain link rows —
  WordPress wraps JSON styles in :where(), which always loses to a
  real Sass rule on specificity. Excluded the new is-style from the
  conflicting _details-motion.scss declarations instead (temporary,
  removed once Group 5 migrates that file).
- services-mega-menu.html combined two is-style-* classes on one
  block; WordPress only renders the first. Merged into one variation
  (mega-menu-panel-services.json).
- Mobile Services accordion had inconsistent column widths (markup
  bug, not CSS) and, per follow-up request, now switches 2→3 columns
  at 650px via CSS grid.
- Removed two JSON files (mobile-menu-brand, mobile-menu-actions)
  that mixed genuine JSON-only needs with plain properties that had
  no business being anything but inline attributes on a single-use
  block.

New: styles/blocks/details/mobile-menu-accordion.json,
     styles/blocks/paragraphs/mobile-menu-link-row.json,
     styles/sections/menu/mega-menu-panel-services.json
Phase 3 Group 2 (LS-2340): moves _card-motion.scss's structural rules
into styles/**.json, keeping only real motion (transitions/transforms/
the accent-gradient @Keyframes) or a confirmed JSON limitation.

Two content/registration fixes discovered along the way, unrelated to
the CSS migration itself:
- inc/portfolio-card-colors.php swapped the WooCommerce card's
  classname too late in WordPress's render pipeline (on render_block,
  after core had already generated CSS for the un-swapped name).
  Moved to render_block_data at priority 9, before core's own
  variation-detection filter, so the swap is visible when core decides
  what CSS to generate.
- .ls-card__icon-shell promoted from a plain shared className (3
  patterns, 5 instances) to a proper JSON style, card-icon-shell.json.

Also, after manual QA surfaced it: fixed position/overflow missing
from 4 JSON files (dropped when removing the surface-card mixin call
— only border/background/shadow/spacing were checked against the
mixin's output, not all of it), and added a hover treatment to
is-style-card-case-study, which never had one — reused
card-category's exact pattern for family consistency.

New: styles/sections/cards/card-icon-shell.json
…p 3)

Migrates _footer-motion.scss's remaining structural CSS into JSON: nav
link underline setup into footer-nav-link.json, missing minWidth into
footer-social-icon.json (fixes the circle), notes-badge width inlined
onto the single-use pattern.

Also fixes two mobile issues found during manual QA: the 3 proof-stat
cards (15+/AA/100%) now stay in one row via isStackedOnMobile:false
instead of WordPress's default full-width stack, and the 5 nav
categories now render 2-per-row via a scoped @media grid (mirroring
the existing Services mega-menu accordion pattern) instead of
stacking one per row. Also fixes a stat card's wrapping copy
("focus" → "focused").
Moves button-motion's rest-state structural CSS into JSON: the shared
button shell and default-fill/outline recipe vars into a new
core-button.json css field, Glass Button's background/border/shadow
and non-hover edge-highlights into glass-button.json, Button Arrow
Compact's rest-state size/shape into button-arrow-compact.json. Inlines
the 4 single-use CTA-consultation patterns' on-dark colour pinning and
wrapper positioning instead of leaving them in shared SCSS. Only real
motion (transitions, hover/focus states, backdrop-filter's required
@supports) stays in SCSS. is-style-button-glow-accent left untouched
(dead selector, tracked on LS-2341).

Fixes a regression caught during manual QA: the new JSON css fields
targeted `& .wp-block-button__link`, but core/button's own root
selector is already `.wp-block-button .wp-block-button__link` — the
double-nested selector never matched, silently dropping position:
relative and letting the fill button's ::before reveal escape its
container. Corrected to `&`.
… Group 5)

Details/Accordion
- Rest-state structural CSS (summary layout, marker reset, arrow
  shape, content spacing) moved into core-details.json
- Only real motion stays in SCSS: transitions, arrow rotation,
  hover/[open]/focus-within states
- mobile-menu-accordion's :not() padding exclusion kept as a real
  (non-:where()) rule on purpose — its own override relies on
  out-specifying it at equal specificity via source order

Header
- Inlined header-motion's last 2 mq() call-sites as literal @media
  breakpoints (nav-toggle, tablet-landscape)
- mq mixin now has zero remaining consumers anywhere

Left unchanged (confirmed correct)
- .site-header__search button/input stays in SCSS — core-search.json
  applies theme-wide, and a second core/search consumer
  (template-search.php) uses a different layout that would have
  wrongly inherited the header's icon-only button styling
- is-style-header-icon-button still has 0 consumers (LS-2341)
Link Arrow Accent
- Rest-state layout (display/align-items/gap on the link, baseline
  transform on the arrow glyph) moved into link-arrow-accent.json
- Rest colour stays in SCSS rather than JSON's elements.link — it
  needs the --ls-link-arrow-colour custom-property-with-fallback
  pattern so the CTA band's on-dark override still works, which the
  elements schema can't express
- Only real motion stays in SCSS: transitions, hover/focus states,
  the cross-card-hover compound selectors, content: (Sass icon var)

Left unchanged (confirmed dead)
- is-style-link-underline-accent has 0 consumers — untouched,
  tracked on LS-2341
…p 7)

Inlines every remaining mixin call-site so 3 of 5 mixin files can be
deleted outright:

- All 8 @include motion.reduced-motion {} call-sites (header, card,
  footer, text, button, menu-motion x3) → literal
  @media (prefers-reduced-motion: reduce) {}
- button-motion's surface.absolute-fill() → literal position/inset
- faq-motion's surface.surface-card() → literal
  position/overflow/border/background/box-shadow

Deletes _mq.scss, _breakpoints-theme.scss, _glass.scss — confirmed
zero remaining references anywhere. Also removes the sync:breakpoints
tooling (package.json build:css/watch:css, theme-utils.mjs function +
CLI case + help text) so the deleted breakpoints file stays gone.

_motion.scss and _surface.scss stay for now — their only remaining
consumer is gsap/_card-spotlight.scss, a dead file (is-style-card-
spotlight has 0 consumers, already tracked on LS-2341) left untouched
per instruction.
…p 9)

Duplicate hover consolidation
- New _shared-hover.scss merges 3 groups of previously copy-pasted
  hover/motion rules into one shared rule each:
  - Circular icon-button hover (header search button, mobile-menu
    close button, footer proof-card, footer social-icon)
  - Mega-menu-item row hover (Default + Service items)
  - Glass @supports blur block (Glass Button + Glass Card)
- Each duplicate removed from its original file, replaced with a
  pointer comment

Bug fix (caught in code review)
- Icon-button consolidation had silently swapped :focus-visible for
  :focus-within on 2 of 4 merged selectors (header search button,
  mobile-menu close button)
- Split back into two rules sharing the same transition/hover values
  but keeping each selector's original pseudo-class

Group 8 — enqueue gating
- Investigated inc/animations.php, no code change needed
- Every front-end template needs animations.css via header+footer
  template parts, so there's no further gating opportunity beyond
  LS-2339

Group 9 — recompile + verify
- Final rebuild, CHANGELOG.md entry added
- LS-2340 acceptance criteria checked off
- animations.css: 2,003 → 1,444 lines
@brandonmarshal brandonmarshal added area:theme Theme & styles (templates, template parts, FSE) comp:block-styles Block styles registered via JSON comp:style-variations JSON style variations comp:theme-json Tokens, presets, settings lang:css Stylesheets lang:json JSON config/content lang:php PHP code priority:important High impact; schedule next. status:needs-review Awaiting code review labels Aug 12, 2026
@linear-code

linear-code Bot commented Aug 12, 2026

Copy link
Copy Markdown

LS-2340

@brandonmarshal brandonmarshal self-assigned this Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "version"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: c1d4959b-f37f-4bae-ad45-a84edebf277c

📥 Commits

Reviewing files that changed from the base of the PR and between acef751 and c0dd782.

📒 Files selected for processing (2)
  • styles/blocks/buttons/glass-button.json
  • styles/presets/blocks/core-button.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • styles/presets/blocks/core-button.json
  • styles/blocks/buttons/glass-button.json

📝 Walkthrough

Walkthrough

The change moves structural styling from Sass and generated CSS into JSON style definitions, consolidates shared hover and reduced-motion rules, updates menu and footer responsive layouts, changes portfolio color processing to parsed blocks, and removes breakpoint synchronization tooling.

Changes

Theme modernization

Layer / File(s) Summary
JSON style contracts
styles/blocks/*, styles/presets/*, styles/sections/*, theme.json
JSON now defines structural styles for buttons, details, cards, menus, links, icon shells, the home hero, and lift animation values.
Animation and responsive CSS consolidation
assets/css/animations.css, src/scss/animations/*, src/scss/gsap/*, assets/css/gsap-animations.css
Sass and CSS retain motion-specific rules while shared hover behavior, reduced-motion handling, responsive grids, overlays, footer layouts, and rest-state styling move to shared CSS or JSON.
Template and pattern integration
parts/*, patterns/*
Templates and patterns apply the new accordion, link-row, menu, footer, and card icon-shell styles.
Block rendering and build tooling
inc/portfolio-card-colors.php, package.json, theme-utils.mjs, README.md, .github/*, .agents/*, CHANGELOG.md
Portfolio classes are updated in render_block_data before core style processing. The breakpoint synchronization command and its documented workflows are removed.

Estimated code review effort: 4 (Complex) | ~60 minutes

Mergeability Score: ⚪ Minimal · up to c0dd7

The PR moves structural styling into block-support JSON and updates related theme behavior without any supplied evidence of a current correctness or production regression; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: moving structural CSS into JSON and block supports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/ls-2340-phase-3-move-structural-css-into-jsonblock-supports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates structural styling from animation Sass into WordPress block-style JSON while retaining genuine motion and unsupported responsive rules in Sass.

Changes:

  • Adds and expands reusable JSON block styles for cards, buttons, menus, details and footer components.
  • Simplifies Sass mixins and consolidates shared interactions.
  • Fixes WooCommerce portfolio colour variation timing and recompiles CSS assets.

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
theme.json Adds shared lift tokens.
theme-utils.mjs Removes breakpoint synchronisation.
styles/sections/menu/mega-menu-panel-services.json Adds Services panel styling.
styles/sections/home-hero-section.json Moves hero structure into JSON.
styles/sections/cards/glass-card.json Adds glass-card rest styling.
styles/sections/cards/card-solutions.json Adds Solutions card structure.
styles/sections/cards/card-services.json Adds Services card structure.
styles/sections/cards/card-link-row.json Adds link-row structure.
styles/sections/cards/card-icon-shell.json Adds reusable icon-shell style.
styles/sections/cards/card-feature.json Adds feature-card structure.
styles/sections/cards/card-category.json Adds category-card structure.
styles/sections/cards/card-case-study.json Adds case-study interaction tokens.
styles/presets/blocks/core-details.json Moves details structure into JSON.
styles/presets/blocks/core-button.json Moves shared button shell into JSON.
styles/blocks/paragraphs/mobile-menu-link-row.json Adds mobile link-row style.
styles/blocks/paragraphs/link-arrow-accent.json Moves arrow-link layout into JSON.
styles/blocks/paragraphs/footer-nav-link.json Adds static underline styling.
styles/blocks/groups/icon-frame-glow.json Moves icon-frame structure into JSON.
styles/blocks/groups/footer-social-icon.json Adds minimum-width styling.
styles/blocks/details/mobile-menu-accordion.json Adds flattened mobile accordion style.
styles/blocks/buttons/glass-button.json Moves glass-button rest styling.
styles/blocks/buttons/button-arrow-compact.json Moves compact-button structure.
src/scss/gsap/_home-hero-section.scss Retains responsive hero overrides.
src/scss/animations/_text-motion.scss Inlines reduced-motion query.
src/scss/animations/_shared-hover.scss Consolidates shared interactions.
src/scss/animations/_mobile-menu-motion.scss Reduces mobile-menu Sass.
src/scss/animations/_menu-motion.scss Adds responsive Services grid.
src/scss/animations/_link-motion.scss Retains link interaction behaviour.
src/scss/animations/_header-motion.scss Inlines header breakpoints.
src/scss/animations/_footer-motion.scss Adds responsive footer grid.
src/scss/animations/_faq-motion.scss Inlines former surface mixin.
src/scss/animations/_details-motion.scss Retains details interactions.
src/scss/animations/_card-motion.scss Removes migrated card structure.
src/scss/animations/_button-motion.scss Removes migrated button structure.
src/scss/animations.scss Loads shared hover partial.
src/scss/abstracts/mixins/_mq.scss Removes media-query mixin.
src/scss/abstracts/mixins/_glass.scss Removes glass mixins.
src/scss/abstracts/mixins/_breakpoints-theme.scss Removes generated breakpoint map.
patterns/thank-you-consultation.php Applies icon-shell variation.
patterns/footer.php Updates footer layout.
patterns/cta/section-cta-consultation-strip.php Inlines CTA wrapper layout.
patterns/cta/section-cta-consultation-reassurance.php Inlines CTA colours.
patterns/cta/section-cta-consultation-inline.php Inlines CTA colours.
patterns/cta/section-cta-consultation-band.php Inlines CTA and link colours.
patterns/cards/section-card-services.php Applies icon-shell variation.
patterns/cards/section-card-feature.php Applies icon-shell variation.
parts/services-mega-menu.html Uses combined Services panel variation.
parts/mobile-menu.html Applies new mobile styles and grid markup.
package.json Removes breakpoint sync scripts.
inc/portfolio-card-colors.php Moves colour switching earlier in rendering.
CHANGELOG.md Documents the migration.
assets/css/gsap-animations.css Rebuilds compiled GSAP CSS.
assets/css/animations.css Rebuilds reduced animation CSS.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/scss/animations/_shared-hover.scss
Comment thread package.json
Comment thread styles/blocks/groups/footer-social-icon.json Outdated
Comment thread patterns/footer.php Outdated
Comment thread patterns/cta/section-cta-consultation-band.php Outdated
Comment thread src/scss/animations/_footer-motion.scss
Comment thread src/scss/gsap/_home-hero-section.scss
Comment thread src/scss/animations/_header-motion.scss
Comment thread src/scss/animations/_mobile-menu-motion.scss
Comment thread src/scss/animations/_card-motion.scss

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
patterns/cards/section-card-feature.php (1)

11-11: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add @package ls-theme to both pattern headers.

Both files fail the same PHP Code Quality check because their file comments omit the required package tag.

  • patterns/cards/section-card-feature.php#L11-L11: add @package ls-theme before the closing */.
  • patterns/cards/section-card-services.php#L11-L11: add @package ls-theme before the closing */.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/cards/section-card-feature.php` at line 11, Add the required
`@package` ls-theme tag before the closing comment marker in the file headers of
patterns/cards/section-card-feature.php (lines 11-11) and
patterns/cards/section-card-services.php (lines 11-11).

Source: Pipeline failures

patterns/footer.php (1)

2-8: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the required package annotation.

PHPCS fails because this file header lacks @package. Add @package ls-theme before the closing docblock.

Proposed fix
  * Description: Full site footer — editorial notes panel, company summary with proof points, 5-column link grid, and legal/social bottom bar.
+ *
+ * `@package` ls-theme
  */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/footer.php` around lines 2 - 8, Add the required `@package` annotation
with value ls-theme to the header docblock in the Footer pattern, placing it
before the closing comment while preserving the existing metadata.

Source: Pipeline failures

🧹 Nitpick comments (6)
src/scss/gsap/_home-hero-section.scss (1)

9-13: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Restore the shared breakpoint abstraction.

Line 13 hardcodes 767.98px. This can diverge from theme.json and other responsive rules. Restore the shared breakpoint mixin, or document an approved exception before merge.

As per coding guidelines, src/scss/**/*.scss must “reuse the shared breakpoint mixin.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/gsap/_home-hero-section.scss` around lines 9 - 13, Replace the
hardcoded max-width in the `@media` block with the shared breakpoint mixin used by
other src/scss rules, referencing the tablet-portrait breakpoint from the
centralized configuration rather than duplicating 767.98px. If this section
cannot use the mixin, document the approved exception instead.

Source: Coding guidelines

src/scss/animations/_mobile-menu-motion.scss (1)

104-112: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use logical sizing properties in the new rules.

Lines 105 and 110 use width. The same file uses inline-size and block-size elsewhere, including Line 95 in this change. The coding guidelines require logical properties for directional layout. Switch both to inline-size for consistency.

♻️ Proposed change
 .mobile-menu-actions .wp-block-button {
-  width: 100%;
+  inline-size: 100%;
 }
 
 .mobile-menu-actions .wp-block-button__link {
   display: block;
-  width: 100%;
+  inline-size: 100%;
   text-align: center;
 }

As per coding guidelines: "prefer logical properties for directional layout".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/animations/_mobile-menu-motion.scss` around lines 104 - 112, Replace
the width declarations in the .mobile-menu-actions .wp-block-button and
.mobile-menu-actions .wp-block-button__link rules with inline-size, preserving
their 100% values and all other declarations.

Source: Coding guidelines

src/scss/animations/_button-motion.scss (1)

358-371: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Residual .is-style-card-solutions-accent references remain here.

This PR drops .is-style-card-solutions-accent from _card-motion.scss and documents it as dead with zero consumers (LS-2341). The same class is still present in three :is() selectors in this file: the hover/focus group at Lines 360-361, the arrow hover group at Lines 368-369, and the reduced-motion group at Lines 415-420. The selectors stay inert, so there is no behaviour change. The cleanup is inconsistent across the two partials.

Remove the dead class here as well, or record why it stays only in this file.

♻️ Proposed cleanup
   &:hover,
   &:focus-visible,
-  :is(.is-style-card-solutions, .is-style-card-solutions-accent):hover &,
-  :is(.is-style-card-solutions, .is-style-card-solutions-accent):focus-within & {
+  .is-style-card-solutions:hover &,
+  .is-style-card-solutions:focus-within & {
     background: var(--ls-button-arrow-compact-background-active);
     border-color: var(--ls-button-arrow-compact-border-active);
   }
 
   &:hover::after,
   &:focus-visible::after,
-  :is(.is-style-card-solutions, .is-style-card-solutions-accent):hover &::after,
-  :is(.is-style-card-solutions, .is-style-card-solutions-accent):focus-within &::after {
+  .is-style-card-solutions:hover &::after,
+  .is-style-card-solutions:focus-within &::after {
     color: var(--ls-button-arrow-compact-colour-active);
   }
   .wp-block-button.is-style-button-arrow-compact .wp-block-button__link::after,
   .wp-block-button.is-style-button-arrow-compact .wp-block-button__link:hover::after,
   .wp-block-button.is-style-button-arrow-compact .wp-block-button__link:focus-visible::after,
-  :is(.is-style-card-solutions, .is-style-card-solutions-accent):hover
-    .wp-block-button.is-style-button-arrow-compact
-    .wp-block-button__link::after,
-  :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 {
+  .is-style-card-solutions:hover
+    .wp-block-button.is-style-button-arrow-compact
+    .wp-block-button__link::after,
+  .is-style-card-solutions:focus-within
+    .wp-block-button.is-style-button-arrow-compact
+    .wp-block-button__link::after {
     transform: none;
   }

Also applies to: 415-420

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/animations/_button-motion.scss` around lines 358 - 371, Remove the
dead .is-style-card-solutions-accent selector from the hover/focus rules and the
reduced-motion rules in this partial, retaining .is-style-card-solutions
behavior unchanged. Update each affected :is() selector in the button motion
rules, including the ::after arrow state selectors.
src/scss/animations/_card-motion.scss (1)

43-44: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Comments placed inside selector blocks emit empty rulesets into the compiled CSS. Sass hoists a loud comment inside a block to that block's own output, so a block whose only remaining content is a comment still produces a selector with an empty declaration list. Both sites ship dead bytes in assets/css/animations.css (Lines 271-273 and Lines 1370-1373).

  • src/scss/animations/_card-motion.scss#L43-L44: move the backdrop-filter note above the .is-style-glass-card selector, or change it to a silent // comment.
  • src/scss/animations/_header-motion.scss#L101-L103: move the shared-hover note above the .site-header__search selector, or change it to a silent // comment.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/animations/_card-motion.scss` around lines 43 - 44, Prevent comments
inside selector blocks from generating empty CSS rules: in
src/scss/animations/_card-motion.scss lines 43-44, move the backdrop-filter note
above .is-style-glass-card or make it a silent comment; apply the same change to
the shared-hover note inside .site-header__search in
src/scss/animations/_header-motion.scss lines 101-103.
src/scss/animations/_menu-motion.scss (1)

106-136: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

The divider :nth-child counts hardcode a six-phase list.

-n + 4 at Line 116 and -n + 3 at Line 131 both assume exactly six columns, matching $ls-mega-menu-phases at Line 41. If a phase is added or removed from that list, the dividers land on the wrong rows and no build error occurs.

Derive the counts from the same Sass list, or use :nth-last-child so the last visual row is excluded regardless of the item count.

Also note Line 109 uses var(--wp--style--block-gap) for column-gap while Line 110 uses a spacing preset for row-gap. Confirm that mixing the two is intended.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/animations/_menu-motion.scss` around lines 106 - 136, Update the
divider selectors in the mobile-menu-accordion service grid to avoid hardcoded
phase counts: derive the relevant counts from the shared $ls-mega-menu-phases
Sass list, or use :nth-last-child logic that excludes the final visual row for
both two- and three-column layouts. Preserve the existing responsive divider
behavior, and verify that the differing column-gap and row-gap custom properties
are intentional without changing them unless needed.
src/scss/animations/_header-motion.scss (1)

24-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

The retired mq mixin leaves four hand-maintained breakpoint literals. This PR removes src/scss/abstracts/mixins/_mq.scss and inlines the computed values. Each site now duplicates a number that theme.json owns in settings.custom.layout.break-points, and nothing keeps the two in sync. The coding guidelines require reuse of the shared breakpoint mixin, so confirm this removal is an approved deviation and update the guideline if it is.

  • src/scss/animations/_header-motion.scss#L24-L30: 599.98px and 1023.98px (Line 48) now duplicate the nav-toggle and tablet-landscape entries.
  • src/scss/animations/_card-motion.scss#L340-L361: 781.98px duplicates the columns-stack entry.
  • src/scss/animations/_footer-motion.scss#L130-L141: 781px duplicates the same columns-stack entry with a different value.
  • src/scss/animations/_menu-motion.scss#L122-L122: 650px is a bespoke value with no theme.json entry at all.

Consider keeping a small Sass map of these values so a single edit updates every consumer.

As per coding guidelines: "reuse the shared breakpoint mixin".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/animations/_header-motion.scss` around lines 24 - 30, Restore shared
breakpoint reuse instead of retaining hand-maintained literals: confirm whether
removing the mq mixin is an approved deviation and update the coding guideline
if so; otherwise preserve or replace the mixin with a shared Sass breakpoint map
sourced from theme.json. Apply the solution to
src/scss/animations/_header-motion.scss lines 24-30 and 48, _card-motion.scss
lines 340-361, and _footer-motion.scss lines 130-141 for the named breakpoints;
also address _menu-motion.scss line 122’s bespoke 650px value by defining or
reusing an explicit shared breakpoint.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@patterns/cta/section-cta-consultation-band.php`:
- Around line 48-52: Update the CTA styling for the ls-cta-band__actions and
ls-cta-band__button blocks so the custom properties and button text color are
represented in the corresponding core/group and core/button block attributes or
the CTA class contract, rather than only raw inline style attributes. Preserve
the existing dark-theme values and ensure they survive WordPress editor save
operations.

In `@patterns/cta/section-cta-consultation-strip.php`:
- Line 45: Update the Group block wrapper in the CTA consultation strip markup
by removing its inline style attribute, and add position: relative and display:
inline-flex to the .ls-cta-strip__cta-wrap CSS rule so the core/group
serialization remains valid.

In `@src/scss/animations/_faq-motion.scss`:
- Around line 10-18: Add an empty line after the --ls-faq-border-active custom
property and before position in the FAQ motion rule, preserving the existing
declarations and transition styling.

In `@styles/presets/blocks/core-details.json`:
- Line 27: Update the `& > summary:focus` rule in the details block to use
`:focus-visible` and provide a visible outline, preserving keyboard focus
indication without removing it globally.

In `@styles/sections/cards/card-services.json`:
- Line 31: Remove the positioned-anchor rule for .ls-card-services__cta a so its
::before pseudo-element resolves against the positioned card container and
preserves the card-wide CTA hit area. Leave the card positioning and
pseudo-element rules unchanged.

In `@styles/sections/menu/mega-menu-panel-services.json`:
- Line 31: Update the mega-menu panel sizing CSS by changing the max-width rule
to a logical viewport-based maximum and applying border-box sizing so the
horizontal padding defined earlier is included within the limit. Keep the
existing fit-content width and child layout rules unchanged.

---

Outside diff comments:
In `@patterns/cards/section-card-feature.php`:
- Line 11: Add the required `@package` ls-theme tag before the closing comment
marker in the file headers of patterns/cards/section-card-feature.php (lines
11-11) and patterns/cards/section-card-services.php (lines 11-11).

In `@patterns/footer.php`:
- Around line 2-8: Add the required `@package` annotation with value ls-theme to
the header docblock in the Footer pattern, placing it before the closing comment
while preserving the existing metadata.

---

Nitpick comments:
In `@src/scss/animations/_button-motion.scss`:
- Around line 358-371: Remove the dead .is-style-card-solutions-accent selector
from the hover/focus rules and the reduced-motion rules in this partial,
retaining .is-style-card-solutions behavior unchanged. Update each affected
:is() selector in the button motion rules, including the ::after arrow state
selectors.

In `@src/scss/animations/_card-motion.scss`:
- Around line 43-44: Prevent comments inside selector blocks from generating
empty CSS rules: in src/scss/animations/_card-motion.scss lines 43-44, move the
backdrop-filter note above .is-style-glass-card or make it a silent comment;
apply the same change to the shared-hover note inside .site-header__search in
src/scss/animations/_header-motion.scss lines 101-103.

In `@src/scss/animations/_header-motion.scss`:
- Around line 24-30: Restore shared breakpoint reuse instead of retaining
hand-maintained literals: confirm whether removing the mq mixin is an approved
deviation and update the coding guideline if so; otherwise preserve or replace
the mixin with a shared Sass breakpoint map sourced from theme.json. Apply the
solution to src/scss/animations/_header-motion.scss lines 24-30 and 48,
_card-motion.scss lines 340-361, and _footer-motion.scss lines 130-141 for the
named breakpoints; also address _menu-motion.scss line 122’s bespoke 650px value
by defining or reusing an explicit shared breakpoint.

In `@src/scss/animations/_menu-motion.scss`:
- Around line 106-136: Update the divider selectors in the mobile-menu-accordion
service grid to avoid hardcoded phase counts: derive the relevant counts from
the shared $ls-mega-menu-phases Sass list, or use :nth-last-child logic that
excludes the final visual row for both two- and three-column layouts. Preserve
the existing responsive divider behavior, and verify that the differing
column-gap and row-gap custom properties are intentional without changing them
unless needed.

In `@src/scss/animations/_mobile-menu-motion.scss`:
- Around line 104-112: Replace the width declarations in the
.mobile-menu-actions .wp-block-button and .mobile-menu-actions
.wp-block-button__link rules with inline-size, preserving their 100% values and
all other declarations.

In `@src/scss/gsap/_home-hero-section.scss`:
- Around line 9-13: Replace the hardcoded max-width in the `@media` block with the
shared breakpoint mixin used by other src/scss rules, referencing the
tablet-portrait breakpoint from the centralized configuration rather than
duplicating 767.98px. If this section cannot use the mixin, document the
approved exception instead.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: c9dcf54d-524b-4a3b-9a4d-01cb4e27bc9f

📥 Commits

Reviewing files that changed from the base of the PR and between b26aef1 and bd0eb92.

📒 Files selected for processing (53)
  • CHANGELOG.md
  • assets/css/animations.css
  • assets/css/gsap-animations.css
  • inc/portfolio-card-colors.php
  • package.json
  • parts/mobile-menu.html
  • parts/services-mega-menu.html
  • patterns/cards/section-card-feature.php
  • patterns/cards/section-card-services.php
  • patterns/cta/section-cta-consultation-band.php
  • patterns/cta/section-cta-consultation-inline.php
  • patterns/cta/section-cta-consultation-reassurance.php
  • patterns/cta/section-cta-consultation-strip.php
  • patterns/footer.php
  • patterns/thank-you-consultation.php
  • src/scss/abstracts/mixins/_breakpoints-theme.scss
  • src/scss/abstracts/mixins/_glass.scss
  • src/scss/abstracts/mixins/_mq.scss
  • src/scss/animations.scss
  • src/scss/animations/_button-motion.scss
  • src/scss/animations/_card-motion.scss
  • src/scss/animations/_details-motion.scss
  • src/scss/animations/_faq-motion.scss
  • src/scss/animations/_footer-motion.scss
  • src/scss/animations/_header-motion.scss
  • src/scss/animations/_link-motion.scss
  • src/scss/animations/_menu-motion.scss
  • src/scss/animations/_mobile-menu-motion.scss
  • src/scss/animations/_shared-hover.scss
  • src/scss/animations/_text-motion.scss
  • src/scss/gsap/_home-hero-section.scss
  • styles/blocks/buttons/button-arrow-compact.json
  • styles/blocks/buttons/glass-button.json
  • styles/blocks/details/mobile-menu-accordion.json
  • styles/blocks/groups/footer-social-icon.json
  • styles/blocks/groups/icon-frame-glow.json
  • styles/blocks/paragraphs/footer-nav-link.json
  • styles/blocks/paragraphs/link-arrow-accent.json
  • styles/blocks/paragraphs/mobile-menu-link-row.json
  • styles/presets/blocks/core-button.json
  • styles/presets/blocks/core-details.json
  • styles/sections/cards/card-case-study.json
  • styles/sections/cards/card-category.json
  • styles/sections/cards/card-feature.json
  • styles/sections/cards/card-icon-shell.json
  • styles/sections/cards/card-link-row.json
  • styles/sections/cards/card-services.json
  • styles/sections/cards/card-solutions.json
  • styles/sections/cards/glass-card.json
  • styles/sections/home-hero-section.json
  • styles/sections/menu/mega-menu-panel-services.json
  • theme-utils.mjs
  • theme.json
💤 Files with no reviewable changes (4)
  • src/scss/abstracts/mixins/_breakpoints-theme.scss
  • src/scss/abstracts/mixins/_mq.scss
  • src/scss/abstracts/mixins/_glass.scss
  • theme-utils.mjs

Comment thread patterns/cta/section-cta-consultation-band.php Outdated
Comment thread patterns/cta/section-cta-consultation-strip.php Outdated
Comment thread src/scss/animations/_faq-motion.scss
Comment thread styles/presets/blocks/core-details.json
Comment thread styles/sections/cards/card-services.json Outdated
Comment thread styles/sections/menu/mega-menu-panel-services.json Outdated
Block-validation fix (the important one)
- Reverted 5 inline-style additions back to class-scoped SCSS: footer
  notes-badge width, and the 4 CTA-consultation patterns' on-dark
  button colour pinning + wrapper position/display
- core/group and core/button only regenerate their style attribute
  from registered block attributes on save; none of these custom
  properties or raw width/position values were ever part of that
  schema, so the next editor open+save would have silently stripped
  them and flagged the blocks as invalid

Confirmed bugs fixed
- footer-social-icon.json: minWidth isn't a supported dimensions key
  in WordPress core (only minHeight/height/width are) — moved to the
  css field as min-inline-size instead
- _shared-hover.scss: is-style-mega-menu-item-service hover now scoped
  to .wp-block-paragraph — the same class also applies to the mobile
  accordion's grid wrapper, so focusing one service row was raising
  the whole grid's background
- card-services.json: removed position:relative/z-index from the CTA
  link so its ::before stretched-link overlay resolves against the
  whole card again, restoring the card-wide click area
- mega-menu-panel-services.json: added box-sizing: border-box so the
  padding is included in the 100vw ceiling at narrow viewports

Cleanup
- Updated 4 docs (README, copilot-instructions, styling.instructions,
  the styling-auditor agent doc) that still referenced the deleted
  sync:breakpoints script
- Fixed a stylelint blank-line nit in _faq-motion.scss

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
styles/sections/menu/mega-menu-panel-services.json (1)

1-9: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Register the mega-menu-panel-services block style variation.

WordPress auto-discovers block style variation JSON from /styles/block-styles, not /styles/sections. Move this file to the supported directory or register the variation and merge its style data into theme.json. The separately enqueued animation CSS can still match the existing class, but the JSON-defined panel and grid styles do not apply.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@styles/sections/menu/mega-menu-panel-services.json` around lines 1 - 9, Move
the mega-menu-panel-services block style variation definition from the sections
location into the supported styles/block-styles directory, preserving its
existing slug, blockTypes, and style data so WordPress auto-discovers and
applies the panel and grid styling. Keep the existing
is-style-mega-menu-panel-services class unchanged for the separately enqueued
animation CSS.

Source: Path instructions

🧹 Nitpick comments (1)
src/scss/animations/_footer-motion.scss (1)

156-166: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared breakpoint mixin.

Route the 781px footer breakpoint through the existing shared breakpoint mixin. This prevents breakpoint values from diverging across responsive styles.

As per coding guidelines, reuse the shared breakpoint mixin under “Lean, predictable CSS — keep selectors shallow, reuse the shared breakpoint mixin, prefer logical properties for directional layout, and favour transform or opacity for motion when possible.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/scss/animations/_footer-motion.scss` around lines 156 - 166, Replace the
hardcoded 781px media query around .footer-nav-columns with the existing shared
breakpoint mixin, preserving the current grid declarations and nested
.wp-block-columns behavior within that breakpoint.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@styles/sections/menu/mega-menu-panel-services.json`:
- Around line 1-9: Move the mega-menu-panel-services block style variation
definition from the sections location into the supported styles/block-styles
directory, preserving its existing slug, blockTypes, and style data so WordPress
auto-discovers and applies the panel and grid styling. Keep the existing
is-style-mega-menu-panel-services class unchanged for the separately enqueued
animation CSS.

---

Nitpick comments:
In `@src/scss/animations/_footer-motion.scss`:
- Around line 156-166: Replace the hardcoded 781px media query around
.footer-nav-columns with the existing shared breakpoint mixin, preserving the
current grid declarations and nested .wp-block-columns behavior within that
breakpoint.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 585b3cc7-5fee-46e4-b6f7-d52c5b981762

📥 Commits

Reviewing files that changed from the base of the PR and between bd0eb92 and acef751.

📒 Files selected for processing (13)
  • .agents/agents/wordpress-theme-styling-auditor.agent.md
  • .github/copilot-instructions.md
  • .github/instructions/styling.instructions.md
  • README.md
  • assets/css/animations.css
  • patterns/footer.php
  • src/scss/animations/_button-motion.scss
  • src/scss/animations/_faq-motion.scss
  • src/scss/animations/_footer-motion.scss
  • src/scss/animations/_shared-hover.scss
  • styles/blocks/groups/footer-social-icon.json
  • styles/sections/cards/card-services.json
  • styles/sections/menu/mega-menu-panel-services.json
💤 Files with no reviewable changes (1)
  • .github/copilot-instructions.md
🚧 Files skipped from review as they are similar to previous changes (6)
  • patterns/footer.php
  • src/scss/animations/_faq-motion.scss
  • src/scss/animations/_shared-hover.scss
  • styles/sections/cards/card-services.json
  • assets/css/animations.css
  • src/scss/animations/_button-motion.scss

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 53 changed files in this pull request and generated no new comments.

Suppressed comments (6)

styles/sections/cards/card-icon-shell.json:11

  • This new style still puts supported theme JSON properties into one monolithic CSS string. Padding, border radius, background and the nested outermost/icon-block colour have structured owners (spacing, border, color, and blocks["outermost/icon-block"]); keeping them here bypasses WordPress merging and editor tooling. Move supported declarations to those keys and leave only unsupported flex/overflow/SVG rules in css.
    styles/presets/blocks/core-button.json:7
  • core/button custom CSS is emitted against the block’s link selector, not the outer .wp-block-button wrapper. This therefore does not replace the removed wrapper-level max-inline-size: 100% rules (including the Glass Button rule), so long no-wrap buttons can once again make their wrapper overflow a flex/grid container. Retain the wrapper constraint in Sass or another wrapper-targeted rule.
    styles/sections/cards/card-icon-shell.json:9
  • Existing posts created from these patterns retain only ls-card__icon-shell; registered pattern markup is copied into post content and is not rewritten when the pattern file changes. Since the structural .ls-card__icon-shell fallback was removed from _card-motion.scss, those existing cards lose their icon padding, border, background and nested icon layout after the theme update. Keep a legacy fallback during migration or provide a stored-content migration.

This issue also appears on line 11 of the same file.
package.json:7

  • Removing breakpoint synchronisation leaves several responsive rules hard-coded at 599.98px, 767.98px, 781.98px and 1023.98px while theme.json still declares the canonical breakpoints. A later token change will silently desynchronise the compiled CSS. Retain the generated Sass map/synchronisation step, or add validation that fails when these literals diverge.
		"build:css": "sass --no-source-map --no-charset --style=expanded src/scss/animations.scss:assets/css/animations.css src/scss/gsap-animations.scss:assets/css/gsap-animations.css",

parts/mobile-menu.html:7

  • Customised mobile-menu template parts stored in WordPress retain the old mobile-menu-accordion class without this new is-style-* class. Because this PR also removes the legacy plain-class structural CSS, those existing template-part overrides lose their flattened accordion styling after the update. Keep compatibility selectors for the old class or migrate stored wp_template_part content.
<!-- wp:details {"className":"mobile-menu-accordion is-style-mobile-menu-accordion","layout":{"type":"default"}} -->
<details class="wp-block-details mobile-menu-accordion is-style-mobile-menu-accordion"><summary>Work</summary><!-- wp:group {"layout":{"type":"flex","orientation":"vertical","flexWrap":"nowrap"}} -->

parts/services-mega-menu.html:2

  • Previously customised copies of this template part still contain both style classes. Under the first-variation-only behaviour documented by this PR, WordPress will apply mega-menu-panel and ignore mega-menu-panel-services; now that the Sass grid fallback is removed, those persisted copies lose the Services grid. Preserve a compatibility rule for the old two-class markup or migrate stored template parts.
<!-- wp:group {"className":"is-style-mega-menu-panel-services"} -->
<div class="wp-block-group is-style-mega-menu-panel-services"><!-- wp:group {"style":{"border":{"bottom":{"width":"1px","style":"solid","color":"var:custom|color|border|card"}},"spacing":{"padding":{"bottom":"var:preset|spacing|30"}}},"layout":{"type":"flex","justifyContent":"space-between","flexWrap":"nowrap","verticalAlignment":"bottom"}} -->

@ZaredRogers ZaredRogers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @brandonmarshal

Context
- Flagged in a follow-up Copilot review, not the original PR review
- core-button.json's css field targets core/button's root selector,
  which resolves to the link (.wp-block-button .wp-block-button__link),
  not the outer .wp-block-button wrapper
- The pre-migration SCSS capped the wrapper itself at
  max-inline-size: 100%, so a long, non-wrapping button label couldn't
  grow the wrapper past its flex/grid container — that constraint was
  lost when the rule moved into JSON

Fix
- Adds .wp-block-button { max-inline-size: 100%; } as its own literal
  rule alongside the existing link-scoped rule
- Applied across all 3 affected files:
  - core-button.json — default fill variation
  - core-button.json — outline variation
  - glass-button.json
@brandonmarshal
brandonmarshal merged commit 1e503b9 into develop Aug 13, 2026
2 of 4 checks passed
@brandonmarshal
brandonmarshal deleted the feature/ls-2340-phase-3-move-structural-css-into-jsonblock-supports branch August 13, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:theme Theme & styles (templates, template parts, FSE) comp:block-styles Block styles registered via JSON comp:style-variations JSON style variations comp:theme-json Tokens, presets, settings lang:css Stylesheets lang:json JSON config/content lang:php PHP code priority:important High impact; schedule next. status:needs-review Awaiting code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants