WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.47k stars 4.18k forks source link

Block style removal should be considered a breaking change #42275

Open cbirdsong opened 2 years ago

cbirdsong commented 2 years ago

In 6.0, the "large" style was removed from the quote block. Going off #37580, I see the rationale was that this was obviated by the font size picker in typography options. However, "large" did not necessarily mean only the font size. On an older custom theme, I had styled the standard style with a subtle quote frame treatment, and the large style increased visual prominence in every way, not just font size:

Unstyled: Quote block, unstyled

Large style: Quote block, large style

Updating to 6.0 removed this style from the sidebar in the editor, making it unavailable to editors of the site until I re-registered it. If they did not have a theme developer available it would've been gone forever, and this being a problem doesn't seem to have occurred to anyone during discussion of this change.


Separately, I also now face the specificity problems mentioned in #41219 and #40163 even though I've opted out of using core styles on the front end.

Editor screenshots before/after installing 6.0 Large style before 6.0: ![Quote block, large style, with text clearly visible](https://user-images.githubusercontent.com/1672206/178020271-a54f5bee-e90b-4b0a-9473-fb84f258b1bc.png) Large style after 6.0: ![Quote block, large style, with text covered by ornamental accent mark](https://user-images.githubusercontent.com/1672206/178020284-a908833e-ccc5-4d46-af34-a14c6323cd79.png)
kathrynwp commented 2 years ago

Pinging @carolinan, @ramonjd and @ntsekouras, for your thoughts.

carolinan commented 2 years ago

I understand that this was problematic. In hindsight this could have been avoided if the theme had registered its own custom block style instead of adding CSS to an existing core block style. Also consider that both plugins and themes can unregister the core styles.

carolinan commented 1 year ago

Are there any actionable items here? Or did you only mean this as a reminder?

I mean are you suggesting some sort of revert or re-adding the style?

cbirdsong commented 1 year ago

More a reminder that changes to the default block styles should not be done lightly? I don't think a revert is the move since it's been gone for more than a year, but no one seemed to think about existing themes assuming the "large" style would continue to exist.