Skip to content

Commit

Permalink
feat(Blocks): ✨ Add intro text paragraph style
Browse files Browse the repository at this point in the history
  • Loading branch information
knice committed Feb 27, 2023
1 parent d3bf182 commit 3da48d5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 41 deletions.
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', 'image', 'search', 'group' );
$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', 'search', 'paragraph' );
foreach ( $styled_blocks as $block_name ) {
$args = array(
'handle' => "ucsc-$block_name",
Expand Down
36 changes: 0 additions & 36 deletions wp-blocks/group.css

This file was deleted.

11 changes: 11 additions & 0 deletions wp-blocks/paragraph.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.is-style-ucsc-intro-text {
margin-top: 0;
margin-right: 0;
margin-bottom: var(--wp--preset--spacing--30);
margin-left: 0;
font-style: normal;
font-weight: 400;
line-height: 1.4;
font-size: var(--wp--preset--font-size--three);
color: var(--wp--preset--color--ucsc-rubine-red);
}
8 changes: 4 additions & 4 deletions wp-blocks/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*/
wp.domReady(() => {
// Styles for core/group
wp.blocks.registerBlockStyle('core/group', {
name: 'ucsc-waveform',
label: 'Waveform',
style_handle: 'ucsc-group',
wp.blocks.registerBlockStyle('core/paragraph', {
name: 'ucsc-intro-text',
label: 'Intro text',
style_handle: 'ucsc-paragraph',
});
// Styles for core/list
wp.blocks.registerBlockStyle('core/list', {
Expand Down

0 comments on commit 3da48d5

Please sign in to comment.