This repository has been archived by the owner on Feb 17, 2025. It is now read-only.
Button 2: Add block variation for 'fancy' class for the image block #425
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 is to address the issue in #421, but also a fun excuse play with block variations.
This update adds the option of a 'fancy' image block variation to the image block, to match behaviour already available in the Button 2 theme.
It also updates the related CSS and JavaScript, so although these blocks will have different classes than when this style is used in the old editor, they will still behave the same.
The previews aren't 100% percent (it would be nice to scale down the corners in the thumbnail), but that can be enhanced in a v2.
Options:

Preview when hovering over the 'Fancy' option (you can't really tell from my screenshot):
With 'Fancy' selected: