From 897cbf49f5f8ab911ebfb3024c142d7392f6ae3f Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 2 Apr 2019 09:37:09 -0400 Subject: [PATCH 1/5] Remove thick left border for the title in the code editor. --- packages/editor/src/components/post-title/style.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/editor/src/components/post-title/style.scss b/packages/editor/src/components/post-title/style.scss index f0dc790b1fdd00..6df161aa56864a 100644 --- a/packages/editor/src/components/post-title/style.scss +++ b/packages/editor/src/components/post-title/style.scss @@ -99,6 +99,16 @@ opacity: 1; } } + + // Hide the thick block border in the Code Editor. + .edit-post-text-editor__body & { + + &:not(.is-focus-mode):not(.has-fixed-toolbar):not(.is-selected) .editor-post-title__input:hover, + &:not(.is-focus-mode):not(.has-fixed-toolbar).is-selected .editor-post-title__input { + box-shadow: none; + border-left-width: $border-width; + } + } } .editor-post-title .editor-post-permalink { From d1c92563dfd678cd5a3514133b0d60f49c644469 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 2 Apr 2019 09:37:34 -0400 Subject: [PATCH 2/5] Remove thick left border from the permalink field in the code editor. --- .../editor/src/components/post-permalink/style.scss | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-permalink/style.scss b/packages/editor/src/components/post-permalink/style.scss index 5b13e758439949..4fc849e579c7e4 100644 --- a/packages/editor/src/components/post-permalink/style.scss +++ b/packages/editor/src/components/post-permalink/style.scss @@ -11,7 +11,7 @@ background-clip: padding-box; // Show a thick left border to match the left border on the title field. - border-left: 0; + border-left-width: 0; box-shadow: -$block-left-border-width 0 0 0 $dark-gray-500; // Use a lighter border for dark themes. @@ -36,6 +36,15 @@ // buttons to shrink anyway. flex-shrink: 0; } + + // Hide the thick block border in the Code Editor. + .edit-post-text-editor__body .editor-post-title & { + box-shadow: none; + border: none; + outline: $border-width solid $light-gray-800; + left: 2px; + right: 2px; + } } .editor-post-permalink__copy { From dc24fa610f157c88936301530380a412bafeb153 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 2 Apr 2019 10:12:50 -0400 Subject: [PATCH 3/5] Move styles into the `edit-post` module. --- .../src/components/text-editor/style.scss | 16 ++++++++++++++-- .../src/components/post-permalink/style.scss | 9 --------- .../editor/src/components/post-title/style.scss | 10 ---------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/packages/edit-post/src/components/text-editor/style.scss b/packages/edit-post/src/components/text-editor/style.scss index e925344dc9e3a2..6a2a73cae53e18 100644 --- a/packages/edit-post/src/components/text-editor/style.scss +++ b/packages/edit-post/src/components/text-editor/style.scss @@ -34,6 +34,13 @@ padding: $block-padding; } + // Hide the thick left border in the code editor. + &:not(.is-focus-mode):not(.has-fixed-toolbar):not(.is-selected) .editor-post-title__input:hover, + &:not(.is-focus-mode):not(.has-fixed-toolbar).is-selected .editor-post-title__input { + box-shadow: none; + border-left-width: $border-width; + } + textarea:hover, &.is-selected textarea { box-shadow: 0 0 0 $border-width $light-gray-500; @@ -41,9 +48,14 @@ } .editor-post-permalink { - left: 0; - right: 0; + left: 2; + right: 2; margin-top: -6px; + + // Hide the thick left border in the code editor. + box-shadow: none; + border: none; + outline: $border-width solid $light-gray-800; } @include break-small() { diff --git a/packages/editor/src/components/post-permalink/style.scss b/packages/editor/src/components/post-permalink/style.scss index 4fc849e579c7e4..3694a694fa612f 100644 --- a/packages/editor/src/components/post-permalink/style.scss +++ b/packages/editor/src/components/post-permalink/style.scss @@ -36,15 +36,6 @@ // buttons to shrink anyway. flex-shrink: 0; } - - // Hide the thick block border in the Code Editor. - .edit-post-text-editor__body .editor-post-title & { - box-shadow: none; - border: none; - outline: $border-width solid $light-gray-800; - left: 2px; - right: 2px; - } } .editor-post-permalink__copy { diff --git a/packages/editor/src/components/post-title/style.scss b/packages/editor/src/components/post-title/style.scss index 6df161aa56864a..f0dc790b1fdd00 100644 --- a/packages/editor/src/components/post-title/style.scss +++ b/packages/editor/src/components/post-title/style.scss @@ -99,16 +99,6 @@ opacity: 1; } } - - // Hide the thick block border in the Code Editor. - .edit-post-text-editor__body & { - - &:not(.is-focus-mode):not(.has-fixed-toolbar):not(.is-selected) .editor-post-title__input:hover, - &:not(.is-focus-mode):not(.has-fixed-toolbar).is-selected .editor-post-title__input { - box-shadow: none; - border-left-width: $border-width; - } - } } .editor-post-title .editor-post-permalink { From 6ea09a983c315ce168f6f7f18cc8a8b9b632f8c4 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 2 Apr 2019 10:14:49 -0400 Subject: [PATCH 4/5] Remove no-longer-necessary style change. --- packages/editor/src/components/post-permalink/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-permalink/style.scss b/packages/editor/src/components/post-permalink/style.scss index 3694a694fa612f..5b13e758439949 100644 --- a/packages/editor/src/components/post-permalink/style.scss +++ b/packages/editor/src/components/post-permalink/style.scss @@ -11,7 +11,7 @@ background-clip: padding-box; // Show a thick left border to match the left border on the title field. - border-left-width: 0; + border-left: 0; box-shadow: -$block-left-border-width 0 0 0 $dark-gray-500; // Use a lighter border for dark themes. From 5941dd34ef349d15dfdce232b01f7f56781c066c Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 2 Apr 2019 10:17:22 -0400 Subject: [PATCH 5/5] Remove unnecessary styles. --- packages/edit-post/src/components/text-editor/style.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/edit-post/src/components/text-editor/style.scss b/packages/edit-post/src/components/text-editor/style.scss index 6a2a73cae53e18..d7f3eacd2a23d1 100644 --- a/packages/edit-post/src/components/text-editor/style.scss +++ b/packages/edit-post/src/components/text-editor/style.scss @@ -48,8 +48,6 @@ } .editor-post-permalink { - left: 2; - right: 2; margin-top: -6px; // Hide the thick left border in the code editor.