WordPress / wporg-news-2021

The WordPress.org News Theme
https://wordpress.org/news/
31 stars 21 forks source link

Update CSS for Gutenberg 13.7 #387

Closed ryelle closed 2 years ago

ryelle commented 2 years ago
Before After
before-home after-home
before-podcast after-podcast
andrewserong commented 2 years ago

Thanks for fixing this up! For visibility, just linking through that this PR was required due to the change introduced in https://github.com/WordPress/gutenberg/pull/40875 that refactored how the Layout block support works. Part of the effort in that PR is to reduce the usage of container ID-based classes in favour of semantic classnames, to help address https://github.com/WordPress/gutenberg/issues/41434 and an overall direction in https://github.com/WordPress/gutenberg/issues/38719.

Targeting the wp-block- classname prefix looks safe to me, as that particular classname structure is very unlikely to change.

For further changes to how the Layout block support works, we're currently tracking work in https://github.com/WordPress/gutenberg/issues/39336. One of the goals is to settle on stable classnames for layout that can be relied upon in themes, and then document these reliable classnames in the handbook. For now, it's great to see that the styling rules here can safely rely upon the wp-block- prefix instead!