Service Hero Styles - #127
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This release adds four colour scheme variants to the
imagewize/service-heroblock 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 viaregisterBlockStyleineditor.jsxand drives all visual changes throughis-style-*CSS selectors instyle.css, keeping the InnerBlocks template untouched and maintaining full user control over content. The theme version has been bumped to 2.11.0 instyle.css,CHANGELOG.md, andreadme.txt.Colour Scheme Feature (
service-heroblock):midnight(default),forest,slate, andviolet— registered viaregisterBlockStyleineditor.jsx, making them selectable in the block toolbar's Styles panel without any custom inspector controls..wp-block-imagewize-service-hero.is-style-*and overrides the block background,::beforeradial-gradient overlay, eyebrow pill colours,emitalic title accent, and primary button background/hover state, all coordinated to the scheme's accent hue.rgba(37,99,235,…)blue tones; Forest Green usesrgba(22,163,74,…); Violet usesrgba(124,58,237,…); Slate Teal usesrgba(20,184,166,…).Architecture and Standards:
is-style-*class selectors, consistent with the theme's philosophy of avoiding hardcoded style classes in block templates and preserving user control.rgba(255,255,255,0.25)border) across all four variants.Release and Documentation:
style.css,CHANGELOG.md, andreadme.txtto reflect the new block style feature.Files Changed:
CHANGELOG.md(Modified)readme.txt(Modified)resources/js/blocks/service-hero/editor.jsx(Modified)resources/js/blocks/service-hero/style.css(Modified)style.css(Modified)