UNPKG

3.25 kBCSSView Raw
1/********************************************************************************
2 * Copyright (C) 2022 TypeFox and others.
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-2.0.
7 *
8 * This Source Code may also be made available under the following Secondary
9 * Licenses when the conditions for such availability set forth in the Eclipse
10 * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11 * with the GNU Classpath Exception which is available at
12 * https://www.gnu.org/software/classpath/license.html.
13 *
14 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15 ********************************************************************************/
16
17/* Adapted from https://github.com/microsoft/vscode/blob/7d9b1c37f8e5ae3772782ba3b09d827eb3fdd833/src/vs/workbench/services/hover/browser/hoverService.ts */
18
19:root {
20 --theia-hover-max-width: 500px;
21}
22
23.theia-hover {
24 font-family: var(--theia-ui-font-family);
25 font-size: var(--theia-ui-font-size1);
26 color: var(--theia-editorHoverWidget-foreground);
27 background-color: var(--theia-editorHoverWidget-background);
28 border: 1px solid var(--theia-editorHoverWidget-border);
29 padding: var(--theia-ui-padding);
30 max-width: var(--theia-hover-max-width);
31}
32
33.theia-hover .hover-row:not(:first-child):not(:empty) {
34 border-top: 1px solid var(--theia-editorHoverWidgetInternalBorder);
35}
36
37.theia-hover hr {
38 border-top: 1px solid var(--theia-editorHoverWidgetInternalBorder);
39 border-bottom: 0px solid var(--theia-editorHoverWidgetInternalBorder);
40 margin: var(--theia-ui-padding) calc(var(--theia-ui-padding) * -1);
41}
42
43.theia-hover a {
44 color: var(--theia-textLink-foreground);
45}
46
47.theia-hover a:hover {
48 color: var(--theia-textLink-active-foreground);
49}
50
51.theia-hover .hover-row .actions {
52 background-color: var(--theia-editorHoverWidget-statusBarBackground);
53}
54
55.theia-hover code {
56 background-color: var(--theia-textCodeBlock-background);
57 font-family: var(--theia-code-font-family);
58}
59
60.theia-hover::before {
61 content: '';
62 position: absolute;
63}
64
65.theia-hover.top::before {
66 left: var(--theia-hover-before-position);
67 bottom: -5px;
68 border-top: 5px solid var(--theia-editorHoverWidget-border);
69 border-left: 5px solid transparent;
70 border-right: 5px solid transparent;
71}
72
73.theia-hover.bottom::before {
74 left: var(--theia-hover-before-position);
75 top: -5px;
76 border-bottom: 5px solid var(--theia-editorHoverWidget-border);
77 border-left: 5px solid transparent;
78 border-right: 5px solid transparent;
79}
80
81.theia-hover.left::before {
82 top: var(--theia-hover-before-position);
83 right: -5px;
84 border-left: 5px solid var(--theia-editorHoverWidget-border);
85 border-top: 5px solid transparent;
86 border-bottom: 5px solid transparent;
87}
88
89.theia-hover.right::before {
90 top: var(--theia-hover-before-position);
91 left: -5px;
92 border-right: 5px solid var(--theia-editorHoverWidget-border);
93 border-top: 5px solid transparent;
94 border-bottom: 5px solid transparent;
95}
96
97.theia-hover.extended-tab-preview {
98 border-radius: 10px;
99}