diff --git a/blockbase/assets/ponyfill.css b/blockbase/assets/ponyfill.css index da17b2c341..422a674d0e 100644 --- a/blockbase/assets/ponyfill.css +++ b/blockbase/assets/ponyfill.css @@ -896,6 +896,10 @@ div.wp-block-query-pagination .wp-block-query-pagination-numbers .current { font-style: var(--wp--custom--quote--citation--typography--font-style); } +.wp-block-search { + /* Block Styles */ +} + .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { padding: var(--wp--custom--form--border--width); border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color); @@ -966,6 +970,14 @@ div.wp-block-query-pagination .wp-block-query-pagination-numbers .current { opacity: 0.66; } +.wp-block-search.is-style-small-search { + --wp--custom--button--typography--font-size: calc( 0.8 * var(--wp--preset--font-size--small)); +} + +.wp-block-search.is-style-small-search .wp-block-search__input { + padding: calc( 0.5 * var(--wp--custom--form--padding)); +} + .wp-block-separator { opacity: var(--wp--custom--separator--opacity); } diff --git a/blockbase/inc/block-patterns.php b/blockbase/inc/block-patterns.php index ad5828ff66..3192aef6fb 100644 --- a/blockbase/inc/block-patterns.php +++ b/blockbase/inc/block-patterns.php @@ -21,6 +21,7 @@ function blockbase_register_block_patterns() { 'footer-columns', 'footer-left', 'footer-primary', + 'footer-search', 'footer-separator', 'footer-simple', 'footer-small', diff --git a/blockbase/inc/block-styles.php b/blockbase/inc/block-styles.php index b32f0834f4..a1707f2163 100644 --- a/blockbase/inc/block-styles.php +++ b/blockbase/inc/block-styles.php @@ -49,6 +49,14 @@ function blockbase_register_block_styles() { 'style_handle' => 'post-category-icon', ) ); + register_block_style( + 'core/search', + array( + 'name' => 'small-search', + 'label' => __( 'Small', 'blockbase' ), + 'style_handle' => 'small-search', + ) + ); } } endif; diff --git a/blockbase/inc/patterns/footer-search.php b/blockbase/inc/patterns/footer-search.php new file mode 100644 index 0000000000..62ccf16772 --- /dev/null +++ b/blockbase/inc/patterns/footer-search.php @@ -0,0 +1,26 @@ + __( 'Footer with Search Block', 'blockbase' ), + 'categories' => array( 'blockbase' ), + 'blockTypes' => array( 'core/template-part/footer' ), + 'content' => ' +
+ +
+ +
+ + +

Proudly Powered by WordPress

+ +
+ +
+ ', +); diff --git a/blockbase/sass/blocks/_search.scss b/blockbase/sass/blocks/_search.scss index bf113f44c2..ac299fb4b6 100644 --- a/blockbase/sass/blocks/_search.scss +++ b/blockbase/sass/blocks/_search.scss @@ -33,4 +33,12 @@ opacity: 0.66; } } + + /* Block Styles */ + &.is-style-small-search{ + --wp--custom--button--typography--font-size: calc( 0.8 * var(--wp--preset--font-size--small)); + .wp-block-search__input { + padding: calc( 0.5 * var(--wp--custom--form--padding) ); + } + } }