fix: update CSS selector used to fix linked header style editor previews #1561
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.
All Submissions:
Changes proposed in this Pull Request:
In WordPress 6.6, there are a couple visual discrepancies in the Post Inserter in the Newsletter editor compared to WP 6.5; this PR fixes one, but also captures the other one since it's noticeable when reviewing this PR:
Change one:
In WP 6.5, text blocks in the Newsletter editor like headings and paragraphs have the following CSS classes:
But in 6.6, two are removed, leaving:
I don't get why this changed, since the classes are still used in Gutenberg, but this causes links in headings -- like the linked headings in the Post Inserter block -- not to use the correct link colour by default (black), and not to pick up custom Heading colours in the editor preview. For both, this is because we're using the
block-editor-rich-text__editable
class to make sure links in headers inherit the colour from the header.Change two:
The CSS reset classes in the editor got a little more specific in WP 6.6. It's specifically noticeable in what the Post Inserter is picking up style-wise on the
body
tag, and both seem to be improvements: it gets rid of the grey background that the Post Inserter was picking up from WP admin, and it makes the font size a little more true to the sent newsletter. This is not something that needs to be "fixed", but it explains some extra discrepancies between the 6.5 and 6.6 screenshots below.See: 1207594452716169-as-1207759233535677
How to test the changes in this Pull Request:
npm run build
.trunk
.On
trunk
:With this PR:
Other information: