remove extra margins on completion hovers with markdown (#59786)

* remove extra margins on completion hovers with markdown

* fixed styles to consider docs with multiple paragraphts

* space above docs as padding (instead of margin)

See https://stackoverflow.com/questions/27829250/child-margin-doesnt-affect-parent-height

* space above docs as padding (instead of margin)

See https://stackoverflow.com/questions/27829250/child-margin-doesnt-affect-parent-height

fix styles for suggest when it has zero or two paragraphs

* merge css rules

* add padding to non-empty span elements inside `.markdown-docs`
This commit is contained in:
Agustín Rodríguez 2018-10-15 14:51:59 -03:00 committed by Ramya Rao
parent d4dbfa3c29
commit 3266781c5c

View file

@ -226,7 +226,7 @@
opacity: 0.7;
word-break: break-all;
margin: 0;
padding: 4px 0 4px 5px;
padding: 4px 0 12px 5px;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs {
@ -236,9 +236,23 @@
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs {
padding: 0;
white-space: initial;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div,
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > span:not(:empty) {
padding: 4px 5px;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:first-child {
margin-top: 0;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:last-child {
margin-bottom: 0;
}
.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs .code {
white-space: pre-wrap;
word-wrap: break-word;