Automattic / Automattic/blocks-everywhere
Editor CSS should be isolated from the page
- Dominant language
- PHP
- Stars
- 94
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
The Block editor loads the editor stylesheet into the context of the page, however the Block Editor CSS loaded is not scoped to the editor instance at all.
This causes an issue for sites where blocks are present outside of the editor, such as on WordPress.org Forums where the `` and `` are blocks. In our case, it seems that some specific CSS rules we can add will resolve this, but it's likely that future Gutenberg style updates may break other blocks.
The editor should likely be loaded within an iframe, and communicate with the parent page through `postMessage` for ideal compatibility (props @StevenDufresne for the suggestion).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the Block editor stylesheet is loaded into the page context. Evaluate the proposed iframe boundary and postMessage communication, then verify that blocks outside the editor no longer receive editor CSS; the issue names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, wordpress
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100