Skip to content

Commit

Permalink
fix: 🎨 Image block stylesheet and caption styles; remove rounded bloc…
Browse files Browse the repository at this point in the history
…k style. Fixes #101
  • Loading branch information
knice committed Aug 17, 2022
1 parent 6c8d619 commit 5492462
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function ucsc_setup() {
/*
* Load additional block styles.
*/
$styled_blocks = array( 'button', 'post-template', 'post-author', 'site-title', 'query-pagination', 'post-content', 'rss', 'post-title', 'post-comments', 'navigation', 'list', 'separator', 'latest-posts', 'quote');
$styled_blocks = array( 'button', 'post-template', 'post-author', 'site-title', 'query-pagination', 'post-content', 'rss', 'post-title', 'post-comments', 'navigation', 'list', 'separator', 'latest-posts', 'quote', 'image');
foreach ( $styled_blocks as $block_name ) {
$args = array(
'handle' => "ucsc-$block_name",
Expand Down
5 changes: 5 additions & 0 deletions wp-blocks/image.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.wp-block-image figcaption {
text-align: left;
font-size: var(--wp--preset--font-size--small);
color: var(--wp--preset--color--dark-gray);
}
4 changes: 4 additions & 0 deletions wp-blocks/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ wp.domReady(() => {
// Styles for core/quote
wp.blocks.unregisterBlockStyle("core/quote", "default");
wp.blocks.unregisterBlockStyle("core/quote", "plain");

// Styles for core/image
wp.blocks.unregisterBlockStyle("core/image", "default");
wp.blocks.unregisterBlockStyle("core/image", "rounded");
});

0 comments on commit 5492462

Please sign in to comment.