提交 95f39245 编写于 作者: R Ramya Achutha Rao

Move close icon to fix case when there is docs but no details

上级 6ec7c698
......@@ -87,7 +87,7 @@
font-weight: bold;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close,
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details {
opacity: 0.6;
background-position: center center;
......@@ -96,15 +96,16 @@
cursor: pointer;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close {
background-image: url('./close.svg');
float: right;
}
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details {
background-image: url('./info.svg');
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover,
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close:hover,
.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details:hover {
opacity: 1;
}
......@@ -203,14 +204,7 @@
white-space: pre-wrap;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header {
padding: 4px 5px;
display: flex;
box-sizing: border-box;
border-bottom: 1px solid rgba(204, 204, 204, 0.5);
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type {
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .type {
flex: 2;
overflow: hidden;
text-overflow: ellipsis;
......@@ -231,8 +225,8 @@
/* High Contrast and Dark Theming */
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close,
.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close {
.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .close,
.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .close {
background-image: url('./close-dark.svg');
}
......
......@@ -186,7 +186,6 @@ class SuggestionDetails {
private el: HTMLElement;
private close: HTMLElement;
private header: HTMLElement;
private scrollbar: DomScrollableElement;
private body: HTMLElement;
private type: HTMLElement;
......@@ -211,11 +210,10 @@ class SuggestionDetails {
append(this.el, this.scrollbar.getDomNode());
this.disposables.push(this.scrollbar);
this.header = append(this.body, $('.header'));
this.type = append(this.header, $('p.type'));
this.close = append(this.header, $('span.close'));
this.close = append(this.body, $('span.close'));
this.close.title = nls.localize('readLess', "Read less...{0}", triggerKeybindingLabel);
this.type = append(this.body, $('p.type'));
this.docs = append(this.body, $('p.docs'));
this.ariaLabel = null;
......@@ -243,7 +241,7 @@ class SuggestionDetails {
this.type.innerText = item.suggestion.detail || '';
this.docs.textContent = item.suggestion.documentation;
this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px';
this.el.style.height = this.type.offsetHeight + this.docs.offsetHeight + 'px';
this.close.onmousedown = e => {
e.preventDefault();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册