Skip to content
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

RichText: remove obsolete rule from stylesheet #13871

Merged
merged 1 commit into from
Feb 14, 2019
Merged

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Feb 14, 2019

Description

Removes the p:empty rule. There's no way it can ever be empty. It's always padded with a <br> element. I believe this is a remnant from the early TinyMCE days when we didn't have a rich text state yet. There would be cases were TinyMCE wouldn't pad with a <br> element. Now this is impossible.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@ellatrix ellatrix changed the title Fix/rich text styles RichText: remove obsolete rule from stylesheet Feb 14, 2019
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
I verified empty rich texts contain <br data-rich-text-padding="true"> so this rule is never used as described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants