Skip to content
This repository was archived by the owner on Nov 25, 2021. It is now read-only.

Commit 24f9688

Browse files
committed
feat(hoveroverlay): remove Sourcegraph styling assumptions
Read --border-color for border and decouple from Sourcegraph styles
1 parent a91fd6f commit 24f9688

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/HoverOverlay.scss

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
.hover-overlay {
2-
$color-border: #2b3750;
3-
$color-light-border: #cad2e2;
4-
52
position: absolute;
6-
width: 30rem;
3+
width: 32rem;
74
max-height: 15rem;
85
display: flex;
96
flex-direction: column;
@@ -18,17 +15,15 @@
1815
padding: 0.25rem;
1916
background: inherit;
2017
z-index: 1;
18+
border: none;
2119
}
2220

2321
&__row {
2422
display: block;
2523
width: 100%;
2624
margin: 0;
2725
&:not(:first-child) {
28-
border-top: 1px solid $color-border;
29-
.theme-light & {
30-
border-top-color: $color-light-border;
31-
}
26+
border-top: 1px solid var(--border-color);
3227
}
3328
}
3429

@@ -52,14 +47,13 @@
5247
}
5348

5449
&__action:not(:first-child) {
55-
border-left: 1px solid $color-border;
56-
.theme-light & {
57-
border-left-color: $color-light-border;
58-
}
50+
border-left: 1px solid var(--border-color);
5951
}
6052

6153
&__action {
6254
width: percentage(1/3);
55+
text-align: center;
56+
border: none;
6357
}
6458

6559
&__action,
@@ -83,4 +77,8 @@
8377
margin: 0;
8478
overflow-y: auto;
8579
}
80+
81+
code {
82+
white-space: pre;
83+
}
8684
}

0 commit comments

Comments
 (0)