Path: blob/main/src/vs/base/browser/ui/hover/hoverWidget.css
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45.monaco-hover {6cursor: default;7position: absolute;8overflow: hidden;9user-select: text;10-webkit-user-select: text;11box-sizing: border-box;12line-height: 1.5em;13white-space: var(--vscode-hover-whiteSpace, normal);14}1516.monaco-hover.fade-in {17animation: fadein 100ms linear;18}1920.monaco-hover.hidden {21display: none;22}2324.monaco-hover a:hover:not(.disabled) {25cursor: pointer;26}2728.monaco-hover .hover-contents:not(.html-hover-contents) {29padding: 4px 8px;30}3132.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {33max-width: var(--vscode-hover-maxWidth, 500px);34word-wrap: break-word;35}3637.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {38min-width: 100%;39}4041.monaco-hover p,42.monaco-hover .code,43.monaco-hover ul,44.monaco-hover h1,45.monaco-hover h2,46.monaco-hover h3,47.monaco-hover h4,48.monaco-hover h5,49.monaco-hover h6 {50margin: 8px 0;51}5253.monaco-hover h1,54.monaco-hover h2,55.monaco-hover h3,56.monaco-hover h4,57.monaco-hover h5,58.monaco-hover h6 {59line-height: 1.1;60}6162.monaco-hover code {63font-family: var(--monaco-monospace-font);64}6566.monaco-hover hr {67box-sizing: border-box;68border-left: 0px;69border-right: 0px;70margin-top: 4px;71margin-bottom: -4px;72margin-left: -8px;73margin-right: -8px;74height: 1px;75}7677.monaco-hover p:first-child,78.monaco-hover .code:first-child,79.monaco-hover ul:first-child {80margin-top: 0;81}8283.monaco-hover p:last-child,84.monaco-hover .code:last-child,85.monaco-hover ul:last-child {86margin-bottom: 0;87}8889/* MarkupContent Layout */90.monaco-hover ul {91padding-left: 20px;92}93.monaco-hover ol {94padding-left: 20px;95}9697.monaco-hover li > p {98margin-bottom: 0;99}100101.monaco-hover li > ul {102margin-top: 0;103}104105.monaco-hover code {106border-radius: 3px;107padding: 0 0.4em;108}109110.monaco-hover .monaco-tokenized-source {111white-space: var(--vscode-hover-sourceWhiteSpace, pre-wrap);112}113114.monaco-hover .hover-row.status-bar {115font-size: 12px;116line-height: 22px;117}118119.monaco-hover .hover-row.status-bar .info {120font-style: italic;121padding: 0px 8px;122}123124.monaco-hover .hover-row.status-bar .actions {125display: flex;126padding: 0px 8px;127width: 100%;128}129130.monaco-hover .hover-row.status-bar .actions .action-container {131margin-right: 16px;132cursor: pointer;133overflow: hidden;134text-wrap: nowrap;135text-overflow: ellipsis;136}137138.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {139padding-right: 4px;140vertical-align: middle;141}142143.monaco-hover .hover-row.status-bar .actions .action-container a {144color: var(--vscode-textLink-foreground);145text-decoration: var(--text-link-decoration);146}147148.monaco-hover .hover-row.status-bar .actions .action-container a .icon.codicon {149color: var(--vscode-textLink-foreground);150}151152.monaco-hover .markdown-hover .hover-contents .codicon {153color: inherit;154font-size: inherit;155vertical-align: middle;156}157158.monaco-hover .hover-contents a.code-link:hover,159.monaco-hover .hover-contents a.code-link {160color: inherit;161}162163.monaco-hover .hover-contents a.code-link:before {164content: '(';165}166167.monaco-hover .hover-contents a.code-link:after {168content: ')';169}170171.monaco-hover .hover-contents a.code-link > span {172text-decoration: underline;173/** Hack to force underline to show **/174border-bottom: 1px solid transparent;175text-underline-position: under;176color: var(--vscode-textLink-foreground);177}178179.monaco-hover .hover-contents a.code-link > span:hover {180color: var(--vscode-textLink-activeForeground);181}182183/**184* Spans in markdown hovers need a margin-bottom to avoid looking cramped:185* https://github.com/microsoft/vscode/issues/101496186187* This was later refined to only apply when the last child of a rendered markdown block (before the188* border or a `hr`) uses background color:189* https://github.com/microsoft/vscode/issues/228136190*/191.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) p:last-child [style*="background-color"] {192margin-bottom: 4px;193display: inline-block;194}195196/**197* Add a slight margin to try vertically align codicons with any text198* https://github.com/microsoft/vscode/issues/221359199*/200.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon {201margin-bottom: 2px;202}203204.monaco-hover-content .action-container a {205-webkit-user-select: none;206user-select: none;207}208209.monaco-hover-content .action-container.disabled {210pointer-events: none;211opacity: 0.4;212cursor: default;213}214215/* Prevent text selection in all button-like elements within hovers */216.monaco-hover .action-container,217.monaco-hover .action,218.monaco-hover button,219.monaco-hover .monaco-button,220.monaco-hover .monaco-text-button,221.monaco-hover [role="button"] {222-webkit-user-select: none;223user-select: none;224}225226227