WordPress / gutenberg

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

Revert "Site Editor: remove content styles outside canvas (#66432)" #66544

Closed t-hamano closed 1 hour ago

t-hamano commented 4 days ago

What?

This reverts commit 8a2480a88e0bac2685b279ea377ae18d2523022f (#66432).

Why?

66432 prevents content CSS, i.e. CSS for block libraries, from being loaded outside of the iframe canvas. However, there are cases where the block itself applies CSS outside of its content, such as the block toolbar and the block sidebar.

To prevent content CSS from being loaded outside of the iframe canvas, I think we need to take the following two measures in advance:

For now, I think it's necessary to prevent unintended layout collapse.

Testing Instructions

The following two are the blocks where layout problems are most noticeable.

Site Logo Block

Before After
site-logo-before image

Image block with contentOnly Mode Enabled

Before After
image-before image
github-actions[bot] commented 4 days ago

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

ellatrix commented 3 days ago

Ok, one moment, I will try something else then.

ellatrix commented 3 days ago

@t-hamano created an alternative at #66556.

t-hamano commented 1 hour ago

Since #66556 has been marged, I'd like to close this PR.