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

Fix/post title borders in code editor #14771

Merged
merged 5 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
11 changes: 10 additions & 1 deletion packages/editor/src/components/post-permalink/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're in the editor module, we should reference edit-post styles. If we were to override this, it should happen in the edit-post module where we use the post title component.

box-shadow: none;
border: none;
outline: $border-width solid $light-gray-800;
left: 2px;
right: 2px;
}
}

.editor-post-permalink__copy {
Expand Down
10 changes: 10 additions & 0 deletions packages/editor/src/components/post-title/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@
opacity: 1;
}
}

// Hide the thick block border in the Code Editor.
.edit-post-text-editor__body & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the previous comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Should be fixed in dc24fa6


&: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 {
Expand Down