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

Try alternate list item jump fix. #12941

Merged
merged 2 commits into from
Feb 1, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Try alternate list item jump fix.
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 Jan 15, 2019
commit 4409b1335f375dab6c7137d7983e3f883fceb1f9
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