Compare commits

...

2 Commits

Author SHA1 Message Date
72af3dd022 add gradient heading style 2024-05-30 15:08:59 +05:00
786ecf0470 define button styles 2024-05-30 14:53:10 +05:00
2 changed files with 71 additions and 1 deletions

View File

@ -30,3 +30,21 @@ function custom_wp_theme_json_default( $theme_json ) {
return $theme_json->update_with( $new_data );
}
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' );

View File

@ -61,7 +61,7 @@
]
},
"layout": {
"contentSize": "1480px",
"contentSize": "640px",
"wideSize": "1760px"
},
"typography": {
@ -511,6 +511,58 @@
},
"styles": {
"blocks": {
"core/button": {
"border": {
"bottom": {
"color": "var(--wp--preset--color--black)",
"style": "solid",
"width": "1px"
},
"left": {
"color": "var(--wp--preset--color--black)",
"style": "solid",
"width": "1px"
},
"radius": "0px",
"right": {
"color": "var(--wp--preset--color--black)",
"style": "solid",
"width": "1px"
},
"top": {
"color": "var(--wp--preset--color--black)",
"style": "solid",
"width": "1px"
}
},
"color": {
"gradient": "var(--wp--preset--gradient--violet-to-green)",
"text": "var(--wp--preset--color--black)"
},
"elements": {
"link": {
"color": {
"text": "var(--wp--preset--color--black)"
}
}
},
"spacing": {
"padding": {
"bottom": "0.75em",
"left": "2.5em",
"right": "2.5em",
"top": "0.75em"
}
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--instrument-sans)",
"fontStyle": "normal",
"fontWeight": "700",
"letterSpacing": "0.48px",
"lineHeight": "1",
"textTransform": "none"
}
},
"core/heading": {
"color": {
"text": "var(--wp--preset--color--black)"