Skip to content

Commit 2bb32c4

Browse files
committed
Improve height and layout
1 parent b8302f4 commit 2bb32c4

File tree

1 file changed

+2
-1
lines changed
  • projects/packages/jetpack-mu-wpcom/src/features/code-editor/code-editor

1 file changed

+2
-1
lines changed

projects/packages/jetpack-mu-wpcom/src/features/code-editor/code-editor/code-editor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ const setupEditor = async ( target: ReactHTMLTextAreaElement ): Promise< void >
8282
const containerStyleMap = containerElement.computedStyleMap();
8383
const left = containerStyleMap.get( 'padding-left' )?.toString() || '0';
8484
const right = containerStyleMap.get( 'padding-right' )?.toString() || '0';
85+
const paddingBottom = containerStyleMap.get( 'padding-bottom' )?.toString() || '12px';
8586

8687
const top = `${ target.offsetTop }px`;
87-
div.style = `position: absolute; top: ${ top }; left: ${ left }; right: ${ right }; height: calc(100% - ${ top });`;
88+
div.style = `position: absolute; top: ${ top }; left: ${ left }; right: ${ right }; padding-bottom: ${ paddingBottom };`;
8889

8990
editor = new View.EditorView( {
9091
doc: target.value,

0 commit comments

Comments
 (0)