Skip to content

RichText: remove obsolete rule from stylesheet#13871

Merged
ellatrix merged 1 commit intomasterfrom
fix/rich-text-styles
Feb 14, 2019
Merged

RichText: remove obsolete rule from stylesheet#13871
ellatrix merged 1 commit intomasterfrom
fix/rich-text-styles

Conversation

@ellatrix
Copy link
Copy Markdown
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
@ellatrix ellatrix force-pushed the fix/rich-text-styles branch from c1d2f03 to 59f1ef0 Compare February 14, 2019 09:06
Copy link
Copy Markdown
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