Skip to content

Commit

Permalink
Paragraph block: remove min-height (#19835)
Browse files Browse the repository at this point in the history
* Paragraph block: remove min-height

* Use lineheight to set drop cap min height
  • Loading branch information
ellatrix authored Jan 27, 2020
1 parent b42cde3 commit 1fb3c38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function useDropCapMinimumHeight( isDropCap, deps ) {
getComputedStyle(
element,
'first-letter'
).height
).lineHeight
);
} else if ( minimumHeight ) {
setMinimumHeight( undefined );
Expand Down
7 changes: 1 addition & 6 deletions packages/block-library/src/paragraph/editor.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
.block-editor-block-list__block[data-type="core/paragraph"] p {
min-height: $empty-paragraph-height / 2;
line-height: $editor-line-height;
}

// Overwrite the inline style to make the height collapse when the paragraph editable gets focus.
.block-editor-block-list__block[data-type="core/paragraph"] .has-drop-cap:focus {
min-height: $empty-paragraph-height / 2 !important;
min-height: auto !important;
}

0 comments on commit 1fb3c38

Please sign in to comment.