From 067e4002b0330d0859dcb36321c52ef4a75b51c4 Mon Sep 17 00:00:00 2001 From: Aadil Ayub Date: Sat, 11 May 2024 22:27:56 +0500 Subject: [PATCH] Add 'thin' button style --- functions.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/functions.php b/functions.php index 5299df4..7019e8c 100644 --- a/functions.php +++ b/functions.php @@ -8,3 +8,21 @@ function custom_stylesheet() { } add_action( 'wp_enqueue_scripts', 'custom_stylesheet' ); + +add_action( 'init', 'lex_scotland_block_styles'); + +function lex_scotland_block_styles() { + register_block_style( 'core/button', array( + 'name' => 'thin', + 'label' => __( 'Thin', 'lex-scotland' ), + 'inline_style' => ' + .wp-block-button.is-style-thin .wp-element-button { + padding: 8px 16px; + background: var(--wp--preset--color--light-green); + color: var(--wp--preset--color--contrast); + border-radius: 0; + font-size: var(--wp--preset--font-size--small); + } + ' + ) ); +} \ No newline at end of file