This repository was archived by the owner on Jun 20, 2025. It is now read-only.
Twenty Twenty Blocks: Remove entry-styles-wrapper classes from editor-style-block.css - #49
Merged
jffng merged 2 commits intoJul 23, 2020
Conversation
jffng
reviewed
Jul 22, 2020
jffng
left a comment
Collaborator
There was a problem hiding this comment.
Looks like because we're still enqueueing these same styles for the site editor, some styles are leaking when not scoped to .editor-styles-wrapper:
Collaborator
Author
|
Oh right! I'm not sure we need to enqueue those there anymore. We can either remove that, or we can specify that we only load this in the site editor screen. |
Collaborator
Author
|
@jffng I removed that enqueue entirely, and the editor styles are still working for me in the full-site editor. Would you mind giving this another look? |
jffng
self-requested a review
July 23, 2020 13:24
jffng
approved these changes
Jul 23, 2020
jffng
deleted the
twenty-twenty-blocks/remove-entry-styles-wrapper-specificity
branch
July 23, 2020 13:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Followup to #44. @jffng pointed out that
editor-style-block.cssuses the.editor-styles-wrapperclass throughout it. This is a remnant from the original Twenty Twenty Theme, where the stylesheet was pulled in via theenqueue_block_editor_assetshook instead of the usualadd_editor_style. Since we useadd_editor_stylein the blocks-based version, thoseeditor-styles-wrapperclasses should be prepended automatically, and are not necessary to use in the stylesheet anymore.To test: Compare editor styles on
masterto this branch, and make sure they look and work the same.