diff --git a/codemirror-base/src/lib/extensions/commentUI.ts b/codemirror-base/src/lib/extensions/commentUI.ts index 4e3258c1..00d1eb11 100644 --- a/codemirror-base/src/lib/extensions/commentUI.ts +++ b/codemirror-base/src/lib/extensions/commentUI.ts @@ -407,9 +407,24 @@ const commentUITheme = EditorView.baseTheme({ // The draft textarea is width:100% with its own padding + border; without // border-box it spills out of the card's right edge (the card's own reset is // scoped to the sidebar panel, which the popover isn't inside). - ".cm-comment-popover .comment-draft-textarea": { + ".cm-comment-popover .comment-draft-editor": { boxSizing: "border-box", maxWidth: "100%", + minWidth: "0", + width: "100%", + }, + ".cm-comment-popover .comment-draft-editor .cm-content": { + minHeight: "0", + minWidth: "0", + margin: "0", + padding: "8px", + }, + ".cm-comment-popover .comment-draft-editor .cm-line": { + margin: "0", + padding: "0", + }, + ".cm-comment-popover .comment-draft-editor .cm-scroller": { + minWidth: "0", }, }); diff --git a/comments-view/src/styles.css b/comments-view/src/styles.css index 7782ccf7..7688c2b4 100644 --- a/comments-view/src/styles.css +++ b/comments-view/src/styles.css @@ -199,6 +199,8 @@ .comment-draft-editor { height: 6rem; min-height: 6rem; + min-width: 0; + width: 100%; border: 1px solid var(--comments-border); border-radius: 0.5rem; color: var(--comments-fg); @@ -208,11 +210,20 @@ .comment-draft-editor .cm-content { box-sizing: border-box; - min-height: 100%; + min-height: 0; + min-width: 0; + margin: 0; + padding: 0.5rem; +} + +.comment-draft-editor .cm-line { + margin: 0; + padding: 0; } .comment-draft-editor .cm-scroller { height: 100%; + min-width: 0; } .comment-draft-editor:focus-within {