Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/base/browser/ui/hover/hoverWidget.css
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
.monaco-hover {
7
cursor: default;
8
position: absolute;
9
overflow: hidden;
10
user-select: text;
11
-webkit-user-select: text;
12
box-sizing: border-box;
13
line-height: 1.5em;
14
white-space: var(--vscode-hover-whiteSpace, normal);
15
}
16
17
.monaco-hover.fade-in {
18
animation: fadein 100ms linear;
19
}
20
21
.monaco-hover.hidden {
22
display: none;
23
}
24
25
.monaco-hover a:hover:not(.disabled) {
26
cursor: pointer;
27
}
28
29
.monaco-hover .hover-contents:not(.html-hover-contents) {
30
padding: 4px 8px;
31
}
32
33
.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {
34
max-width: var(--vscode-hover-maxWidth, 500px);
35
word-wrap: break-word;
36
}
37
38
.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {
39
min-width: 100%;
40
}
41
42
.monaco-hover p,
43
.monaco-hover .code,
44
.monaco-hover ul,
45
.monaco-hover h1,
46
.monaco-hover h2,
47
.monaco-hover h3,
48
.monaco-hover h4,
49
.monaco-hover h5,
50
.monaco-hover h6 {
51
margin: 8px 0;
52
}
53
54
.monaco-hover h1,
55
.monaco-hover h2,
56
.monaco-hover h3,
57
.monaco-hover h4,
58
.monaco-hover h5,
59
.monaco-hover h6 {
60
line-height: 1.1;
61
}
62
63
.monaco-hover code {
64
font-family: var(--monaco-monospace-font);
65
}
66
67
.monaco-hover hr {
68
box-sizing: border-box;
69
border-left: 0px;
70
border-right: 0px;
71
margin-top: 4px;
72
margin-bottom: -4px;
73
margin-left: -8px;
74
margin-right: -8px;
75
height: 1px;
76
}
77
78
.monaco-hover p:first-child,
79
.monaco-hover .code:first-child,
80
.monaco-hover ul:first-child {
81
margin-top: 0;
82
}
83
84
.monaco-hover p:last-child,
85
.monaco-hover .code:last-child,
86
.monaco-hover ul:last-child {
87
margin-bottom: 0;
88
}
89
90
/* MarkupContent Layout */
91
.monaco-hover ul {
92
padding-left: 20px;
93
}
94
.monaco-hover ol {
95
padding-left: 20px;
96
}
97
98
.monaco-hover li > p {
99
margin-bottom: 0;
100
}
101
102
.monaco-hover li > ul {
103
margin-top: 0;
104
}
105
106
.monaco-hover code {
107
border-radius: 3px;
108
padding: 0 0.4em;
109
}
110
111
.monaco-hover .monaco-tokenized-source {
112
white-space: var(--vscode-hover-sourceWhiteSpace, pre-wrap);
113
}
114
115
.monaco-hover .hover-row.status-bar {
116
font-size: 12px;
117
line-height: 22px;
118
}
119
120
.monaco-hover .hover-row.status-bar .info {
121
font-style: italic;
122
padding: 0px 8px;
123
}
124
125
.monaco-hover .hover-row.status-bar .actions {
126
display: flex;
127
padding: 0px 8px;
128
width: 100%;
129
}
130
131
.monaco-hover .hover-row.status-bar .actions .action-container {
132
margin-right: 16px;
133
cursor: pointer;
134
overflow: hidden;
135
text-wrap: nowrap;
136
text-overflow: ellipsis;
137
}
138
139
.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {
140
padding-right: 4px;
141
vertical-align: middle;
142
}
143
144
.monaco-hover .hover-row.status-bar .actions .action-container a {
145
color: var(--vscode-textLink-foreground);
146
text-decoration: var(--text-link-decoration);
147
}
148
149
.monaco-hover .hover-row.status-bar .actions .action-container a .icon.codicon {
150
color: var(--vscode-textLink-foreground);
151
}
152
153
.monaco-hover .markdown-hover .hover-contents .codicon {
154
color: inherit;
155
font-size: inherit;
156
vertical-align: middle;
157
}
158
159
.monaco-hover .hover-contents a.code-link:hover,
160
.monaco-hover .hover-contents a.code-link {
161
color: inherit;
162
}
163
164
.monaco-hover .hover-contents a.code-link:before {
165
content: '(';
166
}
167
168
.monaco-hover .hover-contents a.code-link:after {
169
content: ')';
170
}
171
172
.monaco-hover .hover-contents a.code-link > span {
173
text-decoration: underline;
174
/** Hack to force underline to show **/
175
border-bottom: 1px solid transparent;
176
text-underline-position: under;
177
color: var(--vscode-textLink-foreground);
178
}
179
180
.monaco-hover .hover-contents a.code-link > span:hover {
181
color: var(--vscode-textLink-activeForeground);
182
}
183
184
/**
185
* Spans in markdown hovers need a margin-bottom to avoid looking cramped:
186
* https://github.com/microsoft/vscode/issues/101496
187
188
* This was later refined to only apply when the last child of a rendered markdown block (before the
189
* border or a `hr`) uses background color:
190
* https://github.com/microsoft/vscode/issues/228136
191
*/
192
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) p:last-child [style*="background-color"] {
193
margin-bottom: 4px;
194
display: inline-block;
195
}
196
197
/**
198
* Add a slight margin to try vertically align codicons with any text
199
* https://github.com/microsoft/vscode/issues/221359
200
*/
201
.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span.codicon {
202
margin-bottom: 2px;
203
}
204
205
.monaco-hover-content .action-container a {
206
-webkit-user-select: none;
207
user-select: none;
208
}
209
210
.monaco-hover-content .action-container.disabled {
211
pointer-events: none;
212
opacity: 0.4;
213
cursor: default;
214
}
215
216
/* Prevent text selection in all button-like elements within hovers */
217
.monaco-hover .action-container,
218
.monaco-hover .action,
219
.monaco-hover button,
220
.monaco-hover .monaco-button,
221
.monaco-hover .monaco-text-button,
222
.monaco-hover [role="button"] {
223
-webkit-user-select: none;
224
user-select: none;
225
}
226
227