Skip to content

Service Hero Styles - #127

Merged
jasperf merged 2 commits into
mainfrom
service-hero-styles
Apr 21, 2026
Merged

Service Hero Styles#127
jasperf merged 2 commits into
mainfrom
service-hero-styles

Conversation

@jasperf

@jasperf jasperf commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

This release adds four colour scheme variants to the imagewize/service-hero block via WordPress block styles, giving content editors a one-click way to change the hero's visual theme directly from the block toolbar. Each scheme — Midnight Blue (default), Forest Green, Violet, and Slate Teal — applies a distinct dark background, a matching dual-ellipse radial gradient overlay, and coordinated accent colours to the eyebrow pill, italic title highlight, and primary CTA button, while the outline button remains neutral across all schemes. The implementation registers the four styles via registerBlockStyle in editor.jsx and drives all visual changes through is-style-* CSS selectors in style.css, keeping the InnerBlocks template untouched and maintaining full user control over content. The theme version has been bumped to 2.11.0 in style.css, CHANGELOG.md, and readme.txt.

Colour Scheme Feature (service-hero block):

  • Added four named block styles — midnight (default), forest, slate, and violet — registered via registerBlockStyle in editor.jsx, making them selectable in the block toolbar's Styles panel without any custom inspector controls.
  • Each scheme targets .wp-block-imagewize-service-hero.is-style-* and overrides the block background, ::before radial-gradient overlay, eyebrow pill colours, em italic title accent, and primary button background/hover state, all coordinated to the scheme's accent hue.
  • The default Midnight Blue gradient uses rgba(37,99,235,…) blue tones; Forest Green uses rgba(22,163,74,…); Violet uses rgba(124,58,237,…); Slate Teal uses rgba(20,184,166,…).

Architecture and Standards:

  • Colour overrides are applied purely through CSS is-style-* class selectors, consistent with the theme's philosophy of avoiding hardcoded style classes in block templates and preserving user control.
  • The outline/ghost CTA button intentionally inherits no scheme-specific overrides, keeping its neutral appearance (rgba(255,255,255,0.25) border) across all four variants.

Release and Documentation:

  • Theme version bumped to 2.11.0 across style.css, CHANGELOG.md, and readme.txt to reflect the new block style feature.

Files Changed:

jasperf added 2 commits April 21, 2026 16:39
Register four block styles (Midnight Blue, Forest Green, Violet, Slate Teal) via registerBlockStyle in editor.jsx. Add coordinated CSS for each is-style-* variant covering background, radial gradient overlay, eyebrow pill, italic title accent colour, and CTA button with hover state. Widen .service-hero__title max-width from 680px to 780px.
@jasperf
jasperf merged commit 6c0063b into main Apr 21, 2026
3 checks passed
@jasperf
jasperf deleted the service-hero-styles branch April 21, 2026 09:43
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.

1 participant