-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Comments Count: Prevent text-decoration from affecting warning #43497
Post Comments Count: Prevent text-decoration from affecting warning #43497
Conversation
Size Change: -19 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up @aaronrobertshaw! Overall I think the approach of stripping out the styles we don't want at the block level when rendering the placeholder is the right way to go for blocks that use placeholders. I ran into an issue with being able to select the block from the place holder, though. Just left a couple comments.
Happy to do more testing later on!
The previous changes broke selection of the block. This refactor allows the block to be selectable again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, thanks for fixing that up @aaronrobertshaw, and good that it resulted in a smaller diff, too!
I can select the placeholder state:
And the "real" rendering of the block still works as expected:
LGTM ✨
Related:
What?
Prevents
text-decoration
support styles from being applied to the block's warning.Why?
Text decoration is rendered differently than other typographic styles and can't be reset via CSS once applied to a parent.
How?
Given the warning is only displayed in the editor while the block is rendered outside a post context, we can avoid applying the text decoration to the block's wrapper when it contains the warning.
Testing Instructions
Screenshots or screencast
Screen.Recording.2022-08-23.at.2.23.11.pm.mp4
Screen.Recording.2022-08-23.at.3.29.30.pm.mp4