提交 3d2f7d26 编写于 作者: P Peng Lyu

Fix Microsoft/vscode-pull-request-github#893. Avoid margin collapse

上级 c0dba426
......@@ -622,8 +622,9 @@ export class ReviewZoneWidget extends ZoneWidget {
const lineHeight = this.editor.getConfiguration().lineHeight;
const arrowHeight = Math.round(lineHeight / 3);
const frameThickness = Math.round(lineHeight / 9) * 2;
console.log(dimensions);
const computedLinesNumber = Math.ceil((headHeight + dimensions.height + arrowHeight + frameThickness) / lineHeight);
const computedLinesNumber = Math.ceil((headHeight + dimensions.height + arrowHeight + frameThickness + 8 /** margin bottom to avoid margin collapse */) / lineHeight);
this._relayout(computedLinesNumber);
}
}
......
......@@ -34,6 +34,10 @@
display: none !important;
}
.monaco-editor .review-widget .body {
overflow: hidden;
}
.monaco-editor .review-widget .body .review-comment {
padding: 8px 16px 8px 20px;
display: flex;
......@@ -198,8 +202,7 @@
}
.monaco-editor .review-widget .body .comment-form {
margin: 0 20px;
padding: 8px 0;
margin: 8px 20px;
}
.monaco-editor .review-widget .validation-error {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册