Have you tried using a global class instead of doing it directly on the block as per @Jonas 's comment:
This may be a feasible workaround until the bug is fixed and the bonus is, if you use multiple post types with similar styling, you could re-use the global class.
I just tested this on the site that isnât working and it also didnât work - no effect, the global class is not used in the back end but works perfectly on the front-end. Very very strange bug.
Yeah, Iâve tried with global classes, block classes, stylesheets, custom CSS, everything I could think of.
So in your case you have some sites where it works and others where it doesnât, right? So you have the same cwicly version/settings on all of them and it works everywhere except for this one site?
Iâve tested out different out different nesting combinations and this seems to be the culprit in my case:
The styles only carry over to the post editor if the content block:
A) has no parent (root > post content block)
B) has a parent but that parent does not have any other children (root > div > post content block)
In a similar way, B) also applies for deeper nesting (e.g. root > div1 > div2 > div3 > post content block). Interestingly enough, as soon as one of the âhigherâ parents has a sibling, the styles stop carrying over to the post editor.
So, for example, root > div1 + sibling > div2 > div3 > post content block also breaks the styles in the post editor, even though neither the post content block itself, its direct parent (div3) nor its second-next parent (div2) have any siblings. So from what I understand, as soon as one element in the tree has a sibling the styles in the post editor will break.
If thatâs what you already meant, @Louis, sorry I misunderstood. Iâm mainly posting because upon reading your reply and testing it out I was a bit surprised about the recursive nature of this bug â so maybe someone else stumbles over that, too, and this might help