Skip to content

Commit

Permalink
Merge pull request #236216 from microsoft/tyriar/228136_2
Browse files Browse the repository at this point in the history
Only add additional margin on hover children with bg
  • Loading branch information
Tyriar authored Dec 16, 2024
2 parents 1bbe4e9 + 188b1f1 commit c08aa73
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/vs/base/browser/ui/hover/hoverWidget.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,23 @@
color: var(--vscode-textLink-activeForeground);
}

/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {
/**
* Spans in markdown hovers need a margin-bottom to avoid looking cramped:
* https://github.com/microsoft/vscode/issues/101496
* This was later refined to only apply when the last child of a rendered markdown block (before the
* border or a `hr`) uses background color:
* https://github.com/microsoft/vscode/issues/228136
*/
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) p:last-child [style*="background-color"] {
margin-bottom: 4px;
display: inline-block;
}

/**
* Add a slight margin to try vertically align codicons with any text
* https://github.com/microsoft/vscode/issues/221359
*/
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon {
margin-bottom: 2px;
}
Expand Down

0 comments on commit c08aa73

Please sign in to comment.