I've found this really wierd bug where if I set the block.json to have a default background color, like this:
"attributes": {
"backgroundColor": {
"type": "string",
"default": "rose-red"
}
}
( "rose-red" is the slug for the color I have set in the theme.json color palette.)
The block will not have the normal "has-background has-rose-red-background-color"-class in front-end. If I remove the default attribute and just select the color in the back end or just select a different color other than the default, the classes works fine.
How do I make wp use a default color on the block AND use the normal color classes in front end?