Closed ryelle closed 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!
wp-container-*
class is no longer added to all blocks, instead we should use thewp-block-*
class. The selector is necessary for specificity, so we can't just remove it.