Skip to content

Commit

Permalink
Try alternate list item jump fix.
Browse files Browse the repository at this point in the history
This PR is an alternative to #12590, and also fixes #12526. Props @Naerriel for initial work and inspiration.

The different approach taken here is to embrace that we are applying a specific margin to our list items and overrides bleed from wp-admin. In doing so it moves these margins to the editor styles stylesheet, which is a more appropriate place for it.
  • Loading branch information
Joen Asmussen committed Dec 17, 2018
1 parent e1092c0 commit 9c1c5b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/editor/src/editor-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ ul,
ol {
margin: 0;
padding: 0;

li {
// This overrides a bottom margin globally applied to list items in wp-admin.
margin-bottom: 0.5em;
}
}

ul {
Expand All @@ -27,6 +32,9 @@ ol {
ul ul,
ol ul {
list-style-type: circle;

// This, combined with the margin applied on line 20, ensures there are no "jumps" when you indent a list item.
margin-top: 0.5em;
}

.mce-content-body {
Expand Down

0 comments on commit 9c1c5b1

Please sign in to comment.