Skip to content

Feat/ls 1711 define spotlight global styles and shared block styling - #3

Merged
josearmandoabreu merged 13 commits into
developfrom
feat/ls-1711-define-spotlight-global-styles-and-shared-block-styling
Aug 6, 2026
Merged

josearmandoabreu merged 13 commits into
developfrom
feat/ls-1711-define-spotlight-global-styles-and-shared-block-styling

Conversation

@josearmandoabreu

@josearmandoabreu josearmandoabreu commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This branch defines Spotlight's global element styles and shared block styling rules on top of the design-token foundation from LS-1710. It closes the gap between "tokens exist" and "content actually looks intentional" — links, buttons, quotes, lists, and heading/paragraph spacing rhythm are now styled in theme.json, grounded against four dev-ready Figma frames (home, article, contact) rather than invented from scratch.

Changes

  • Link colour: corrected styles.elements.link from the brand ramp (brand-500/brand-600) to accent-200/accent-300, confirmed against real body-copy links in the Figma frames — brand-500 stays reserved for category badges/labels, a separate pattern-level concern
  • Default button: styles.elements.button now has a filled look (background/text colour, standard radius, padding, hover state) matching the "Subscribe" instance, instead of rendering with only font-size/weight and browser defaults for everything else
  • Button block-style variations: three new named core/button styles under styles/blocks/button/ — primary (full-pill, accent-blue fill, trailing arrow), dark (navy fill, standard radius, leading icon), dark-pill (navy fill, full-pill) — each a standalone, single-responsibility file following the kwv-theme-2026/Ollie convention, matching four distinct button instances found in the source frames
  • Quote & pullquote: core/quote/core/pullquote now have a border accent, quote-body typography, and a distinct muted cite (attribution) treatment
  • List styling: core/list/core/list-item given a marker colour, <li> spacing, and start-indent — flagged as a reasonable provisional default since no Figma source or reference-theme precedent exists for this element
  • Heading/paragraph spacing rhythm: styles.elements.heading given asymmetric top/bottom margin (more space above a heading than below it) sourced from the existing fluid spacing scale — no new spacing tokens introduced anywhere in this branch
  • Validator fix: theme-utils.mjs's validate-schema now checks block-style-variation partial files (styles/blocks/**/*.json) at their real runtime position instead of the flat root styles shape, and works around a confirmed upstream schema/ajv limitation with pseudo-selector property names (reproduced against kwv-theme-2026's own production cta.json to confirm it wasn't specific to our files)
  • AGENTS.md correction: updated the styles/blocks//styles/sections/ guidance — these files do auto-register as selectable block styles (confirmed working in the Site Editor), correcting the previous claim that they required manual PHP registration
  • OpenSpec change: full change (proposal.md/design.md/specs//tasks.md) drafted, implemented task-group by task-group, and archived; new openspec/specs/base-styles/ capability spec added alongside the existing design-tokens spec
  • Changelog: added entries under [Unreleased], including provisional-value notes for list spacing and heading margins

Files Modified

Source files:

  • theme.json — +95/-6 lines (link colour, default button, quote/pullquote, list/list-item, heading spacing)
  • styles/blocks/button/primary.json — new, 36 lines
  • styles/blocks/button/dark.json — new, 36 lines
  • styles/blocks/button/dark-pill.json — new, 35 lines
  • theme-utils.mjs — +57 lines (block-style-variation schema validation fix)
  • AGENTS.md — corrected styles/blocks//styles/sections/ auto-registration claim
  • CHANGELOG.md — new [Unreleased] entries

Planning/spec files:

  • openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/ — archived change (proposal, design, tasks, delta spec)
  • openspec/specs/base-styles/spec.md — new capability spec

Key Improvements

  • ✅ Base element styling (links, buttons, quotes, lists, heading rhythm) grounded directly against real Figma dev-mode frames rather than guessed, including catching a real conflict between the shipped link colour and what the design actually shows
  • ✅ Button variations structured as one file per fully-specified look (not composable axes), matching kwv-theme-2026's own convention and confirmed to auto-register correctly as selectable block styles with no PHP wiring needed
  • ✅ A real upstream schema/tooling gap was found, diagnosed, and fixed rather than worked around silently — theme-utils.mjs now correctly validates block-style-variation files, unblocking this pattern for future use across the theme
  • ✅ Icon-on-button and citation-styling decisions stay entirely inside theme.json's own schema (the css escape hatch), with zero new authored stylesheet — assets/css/ remains untouched
  • ✅ Provisional, no-design-source values (list spacing/indent, heading margins) are explicitly flagged rather than presented as final, consistent with this repo's established "ship a reasonable default, flag it, correct later" posture
  • ✅ Scoped strictly to base elements and shared button styles — no templates, patterns, or component-level treatments (category badges, icon-list cards, section-header-with-rule) touched; those are noted as candidates for later pattern work (LS-1712)

Related Issues

Closes LS-1711 — define Spotlight global styles and shared block styling rules

Part of LS-1704 — establish Spotlight theme.json foundations and design tokens (parent issue; not closed by this PR — full pattern/component work and custom CSS/JS exception documentation are tracked separately as LS-1712 and LS-1713)

Testing

  • npm run schema:validate passes for theme.json and all styles/**/*.json files, including the three new button variation files
  • npm run theme:validate passes (required files, placeholder tokens, text-domain consistency)
  • Verified in the WordPress Site Editor after every task group: link colour, all 4 button looks (including hover states and icon placement), quote/pullquote citation styling, ordered and unordered list styling, and heading/paragraph spacing rhythm
  • Front-end verification blocked on LS-1705 (single.html/page.html templates don't exist yet, so the theme currently has no way to render singular post/page content on the front end) — tracked as a follow-up once those templates land, including re-checking whether the button hover states (which work in the editor) also render correctly on a real front-end page

Deployment Notes

  • No breaking changes to site functionality — additive styling only, plus one colour correction (link element) with no live content depending on the old value
  • Note for reviewers: two things here are implementation decisions rather than direct Figma exports, flagged for awareness rather than blocking — the three button variation names (primary/dark/dark-pill) are descriptive placeholders pending a quick confirmation of the design system's own component naming, and the list/heading-spacing values have no Figma source at all, chosen as reasonable calm-editorial defaults
  • Two citation styling rules (core/quote/core/pullquote) use !important inside theme.json's scoped css property — this is deliberate and narrowly scoped: WordPress core caps all theme.json custom CSS at a flattened :root :where(...) specificity, which cannot structurally out-specify core's own .wp-block-quote cite default rule, so !important is the sanctioned way around a core-imposed ceiling (same technique kwv-theme-2026 itself uses). Open to revisiting this with Zared if a cleaner approach turns up
  • No build step required — JSON only, no JS/CSS pipeline involved

Checklist

  • JSON schema validation passed
  • Theme consistency validation passed
  • No conflicts with develop
  • Editor spot-check across all styled elements (links, all button variations, quotes, lists, heading spacing)
  • OpenSpec change fully implemented and archived, with a durable base-styles capability spec left behind

Summary by CodeRabbit

  • New Features

    • Added updated styling for links, buttons, quotes, pullquotes, lists, headings, and paragraphs.
    • Added selectable Dashboard, Outline, Republish Article, and Secondary button styles.
    • Added hover treatments, arrow icons, and visual accents for button styles.
  • Bug Fixes

    • Improved validation for block-style variation files and clearer errors for invalid style data.
  • Documentation

    • Added specifications and guidance for global styling and automatic registration of nested block and section variations.
    • Updated validation details and changelog documentation.

josearmandoabreu and others added 9 commits August 5, 2026 15:55
…lement base element styles for links, buttons, quotes, and lists, ensuring alignment with design tokens and enhancing editorial consistency.
…ver states to accent colors for improved consistency.
…kground color, text color, border radius, and padding for buttons, ensuring alignment with design tokens.
…gic: create primary, dark, and dark-pill styles, ensuring proper auto-registration and validation of pseudo-selectors.
…hy, and spacing settings for improved visual consistency.
…, and padding for lists to enhance visual consistency.
… base element styling, button variations, and update CHANGELOG for LS-1711
Moves the completed spotlight-global-styles-and-block-rules change to
openspec/changes/archive/ and adds the new base-styles capability spec
to openspec/specs/, documenting the base element/block styling rules
this change introduced.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@josearmandoabreu josearmandoabreu self-assigned this Aug 5, 2026
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

LS-1711

LS-1704

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@josearmandoabreu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 71fb21b2-f552-49fd-8351-b26b0f3e6380

📥 Commits

Reviewing files that changed from the base of the PR and between 111aa16 and 8dccd8f.

📒 Files selected for processing (4)
  • assets/css/core-button.css
  • assets/css/custom-button.css
  • theme-utils.mjs
  • theme.json

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
📝 Walkthrough

Walkthrough

The PR adds base theme styling, four button style variations, button CSS loading, block-style variation schema validation, OpenSpec artifacts, documentation updates, and changelog entries.

Changes

Base styles and button variations

Layer / File(s) Summary
Base-styles contract
openspec/changes/archive/..., openspec/specs/base-styles/spec.md
Defines requirements, design decisions, scope, and validation tasks for links, buttons, quotes, pullquotes, lists, and spacing.
Global theme styles
theme.json
Updates link colors and heading margins. Adds button, quote, pullquote, list, and list-item styles.
Button style variations and asset loading
styles/blocks/button/*.json, assets/css/*.css, functions.php
Adds four core/button style variations, their icons and hover states, and versioned CSS loading for the front end and block editor.
Variation schema validation
theme-utils.mjs
Wraps block-style variation data for runtime schema validation and removes recognized pseudo-selector keys before AJV validation.
Documentation and release notes
AGENTS.md, CHANGELOG.md
Documents automatic nested variation registration and records the styling and validation changes.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ThemeJSON
  participant VariationJSON
  participant WordPress
  participant ButtonCSS
  ThemeJSON->>WordPress: define base styles
  VariationJSON->>WordPress: register core/button variations
  WordPress->>ButtonCSS: enqueue button styles
  ButtonCSS->>WordPress: apply icons and hover states
Loading

Possibly related PRs

Suggested reviewers: zaredrogers

🚥 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 identifies the main changes: defining Spotlight global styles and shared block styling.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ls-1711-define-spotlight-global-styles-and-shared-block-styling

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.

@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@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: 3

🤖 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 `@CHANGELOG.md`:
- Line 19: Update the Unreleased note in CHANGELOG.md to reference the archived
OpenSpec directory under
openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/
instead of the non-archived path, preserving the existing release-note text.

In `@styles/blocks/button/primary.json`:
- Around line 28-33: Update the theme minimum WordPress version in style.css to
7.0 or later so the :hover styles remain supported in
styles/blocks/button/primary.json lines 28-33, styles/blocks/button/dark.json
lines 28-33, and styles/blocks/button/dark-pill.json lines 28-33; no direct
changes are required in those JSON files.

In `@theme-utils.mjs`:
- Around line 134-140: Update the block style variation validation before
wrapBlockStyleVariation() to require styles to be a non-null object, alongside
the existing blockTypes validation. When styles is missing, null, or otherwise
invalid, mark hasErrors = true and skip wrapping that variation so later JSON
files continue to be validated without a TypeError.
🪄 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: b138b859-48ca-4f1c-b619-0ce87e7a8865

📥 Commits

Reviewing files that changed from the base of the PR and between d290f10 and b18e126.

📒 Files selected for processing (13)
  • AGENTS.md
  • CHANGELOG.md
  • openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/.openspec.yaml
  • openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/design.md
  • openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/proposal.md
  • openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/specs/base-styles/spec.md
  • openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/tasks.md
  • openspec/specs/base-styles/spec.md
  • styles/blocks/button/dark-pill.json
  • styles/blocks/button/dark.json
  • styles/blocks/button/primary.json
  • theme-utils.mjs
  • theme.json

Comment thread CHANGELOG.md Outdated
Comment thread styles/blocks/button/primary.json Outdated
Comment thread theme-utils.mjs Outdated

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

Defines Spotlight’s base styling layer in theme.json (links, buttons, quotes, lists, heading rhythm) and adds three core/button block style variations, with supporting validator and documentation updates so these styles are both selectable in the editor and schema-checked.

Changes:

  • Updated theme.json global element + block styles (link colour ramp, default button styling + hover, quote/pullquote, list spacing/indent, heading margins).
  • Added three core/button block style variations under styles/blocks/button/ (Primary, Dark, Dark Pill), including scoped CSS for icons/hover.
  • Improved theme-utils.mjs validate-schema handling for block-style-variation JSON, and updated OpenSpec/AGENTS/CHANGELOG documentation to reflect the new behaviour and guidance.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
theme.json Adds/adjusts global element and block styles (links, buttons, headings, quotes, lists).
theme-utils.mjs Wraps block style variation files into their runtime schema position for validation, with pseudo-selector workaround.
styles/blocks/button/primary.json New Primary button block style variation.
styles/blocks/button/dark.json New Dark button block style variation.
styles/blocks/button/dark-pill.json New Dark Pill button block style variation.
openspec/specs/base-styles/spec.md New capability spec documenting the base-styles requirements.
openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/tasks.md Archived task breakdown for LS-1711 implementation.
openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/specs/base-styles/spec.md Archived delta spec for the change.
openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/proposal.md Archived proposal for the change.
openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/design.md Archived design decisions/risks for the change.
openspec/changes/archive/2026-08-05-spotlight-global-styles-and-block-rules/.openspec.yaml OpenSpec archive metadata for the change.
CHANGELOG.md Documents the newly added base styles, button variations, and validator update under Unreleased.
AGENTS.md Corrects guidance: styles/blocks/** and styles/sections/** auto-register as block style variations.

Comment thread theme-utils.mjs
Comment thread theme-utils.mjs
Comment thread theme.json

@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: 1

🤖 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 `@assets/css/core-button.css`:
- Line 23: Normalize the CSS keyword case by changing currentColor to
currentcolor in assets/css/core-button.css:23-23,
assets/css/custom-button.css:16-16, assets/css/custom-button.css:39-39, and
assets/css/custom-button.css:62-62. Review assets/css/*.css for correctness and
run the documented linting checks before committing.
🪄 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: 013442d3-ee12-4975-a702-a1ad6e482cfb

📥 Commits

Reviewing files that changed from the base of the PR and between be98438 and 111aa16.

⛔ Files ignored due to path filters (3)
  • assets/icons/arrow-line-up-right.svg is excluded by !**/*.svg
  • assets/icons/arrow-right.svg is excluded by !**/*.svg
  • assets/icons/chart-line-up.svg is excluded by !**/*.svg
📒 Files selected for processing (8)
  • assets/css/core-button.css
  • assets/css/custom-button.css
  • functions.php
  • styles/blocks/button/dashboard.json
  • styles/blocks/button/outline.json
  • styles/blocks/button/republish-article.json
  • styles/blocks/button/secondary.json
  • theme.json
💤 Files with no reviewable changes (1)
  • theme.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • styles/blocks/button/dashboard.json

Comment thread assets/css/core-button.css Outdated
… styles and enhance theme.json with CSS padding for list items

@ZaredRogers ZaredRogers 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.

Looks great @josearmandoabreu

@josearmandoabreu
josearmandoabreu merged commit 8841797 into develop Aug 6, 2026
4 of 6 checks passed
@josearmandoabreu
josearmandoabreu deleted the feat/ls-1711-define-spotlight-global-styles-and-shared-block-styling branch August 6, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants