Unlock Hidden Power: 6 Little-Known Ways to Master Custom Block Styles in WordPress
"styles": {
"blocks": {
"core/image":{
"variations": {
"red-border":{
"border": {
"color":"#cf2e2e",
"style": "solid",
"width": "4px",
"radius":"15px"
}
}
}
},
These two code snippets work together because the name used in the register_block_style() function in your functions.php file and the variations’ name arguments in your theme.json file are identical.



