From 9c1c5b1a432b5357332f37a3cf23873f0c4f815d Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Mon, 17 Dec 2018 09:45:50 +0100 Subject: [PATCH] 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. --- packages/editor/src/editor-styles.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/editor/src/editor-styles.scss b/packages/editor/src/editor-styles.scss index e9d58922c13ca3..2e09e9096f18ca 100644 --- a/packages/editor/src/editor-styles.scss +++ b/packages/editor/src/editor-styles.scss @@ -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 { @@ -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 {