add gradient heading style
This commit is contained in:
parent
786ecf0470
commit
72af3dd022
@ -30,3 +30,21 @@ function custom_wp_theme_json_default( $theme_json ) {
|
|||||||
return $theme_json->update_with( $new_data );
|
return $theme_json->update_with( $new_data );
|
||||||
}
|
}
|
||||||
add_filter( 'wp_theme_json_data_default', 'custom_wp_theme_json_default' );
|
add_filter( 'wp_theme_json_data_default', 'custom_wp_theme_json_default' );
|
||||||
|
|
||||||
|
function jett_block_styles() {
|
||||||
|
register_block_style(
|
||||||
|
'core/heading',
|
||||||
|
array(
|
||||||
|
'name' => 'gradient',
|
||||||
|
'label' => __( 'Gradient', 'jett' ),
|
||||||
|
'inline_style' => '
|
||||||
|
.wp-block-heading.is-style-gradient {
|
||||||
|
background: var(--wp--preset--gradient--violet-to-green);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
line-height: 1.1;
|
||||||
|
}'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
add_action( 'init', 'jett_block_styles' );
|
||||||
|
Loading…
Reference in New Issue
Block a user