Skip to content

Commit

Permalink
Restore Post Title visual styles in Code View mode (#56582)
Browse files Browse the repository at this point in the history
* Apply styles to match previous visuals

* Adjust CSS in response to feedback
  • Loading branch information
getdave authored Nov 29, 2023
1 parent 00ccb8b commit f7d2103
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/edit-post/src/components/text-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
flex-grow: 1;

// Post title.
.editor-post-title {
.editor-post-title:not(.is-raw-text),
.editor-post-title.is-raw-text textarea {
max-width: none;
line-height: $default-line-height;

Expand All @@ -14,6 +15,7 @@
font-weight: normal;

border: $border-width solid $gray-600;
border-radius: 0;

// Same padding as body.
padding: $grid-unit-20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function PostTitleRaw( _, forwardedRef ) {
hideLabelFromVision={ true }
autoComplete="off"
dir="auto"
rows={ 1 }
__nextHasNoMarginBottom
/>
);
Expand Down
7 changes: 4 additions & 3 deletions packages/editor/src/components/post-title/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.edit-post-text-editor__body .is-raw-text textarea {
font-size: inherit;
line-height: inherit;
// Raw Text Variant
.edit-post-text-editor__body .editor-post-title.is-raw-text {
margin-bottom: $grid-unit-30;
margin-top: 2px; // space for focus outline to appear.
}

0 comments on commit f7d2103

Please sign in to comment.