Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 1e12b2e

Browse files
authored
Add highlight CSS (#2985)
1 parent 03a5004 commit 1e12b2e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.cm-highlight {
2+
position: relative;
3+
}
4+
5+
.cm-highlight::before {
6+
position: absolute;
7+
border-top-style: solid;
8+
border-bottom-style: solid;
9+
border-top-color: var(--theme-comment-alt);
10+
border-bottom-color: var(--theme-comment-alt);
11+
border-top-width: 1px;
12+
border-bottom-width: 1px;
13+
top: -1px;
14+
bottom: 0;
15+
left: 0;
16+
right: 0;
17+
content: "";
18+
margin-bottom: -1px;
19+
}
20+
21+
.cm-highlight-full::before {
22+
border: 1px solid var(--theme-comment-alt);
23+
}
24+
25+
.cm-highlight-start::before {
26+
border-left-width: 1px;
27+
border-left-style: solid;
28+
border-left-color: var(--theme-comment-alt);
29+
margin: 0 0 -1px -1px;
30+
border-top-left-radius: 2px;
31+
border-bottom-left-radius: 2px;
32+
}
33+
34+
.cm-highlight-end::before {
35+
border-right-width: 1px;
36+
border-right-style: solid;
37+
border-right-color: var(--theme-comment-alt);
38+
margin: 0 -1px -1px 0;
39+
border-top-right-radius: 2px;
40+
border-bottom-right-radius: 2px;
41+
}

src/components/Editor/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import {
7575
import { getVisibleVariablesFromScope } from "../../utils/scopes";
7676
import { isFirefox } from "devtools-config";
7777
import "./Editor.css";
78+
import "./Highlight.css";
7879

7980
import { SourceEditor } from "devtools-source-editor";
8081

0 commit comments

Comments
 (0)