Skip to content

Commit f1c9086

Browse files
authored
Merge pull request #47 from codecov/box-shadow
use box shadow for PR annotations
2 parents 52f0c4f + a1f3e18 commit f1c9086

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/github/pr/main.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,21 @@ function annotateLine(line: HTMLElement) {
157157
if (status == null) {
158158
return;
159159
}
160-
const borderStylePrefix = "2px solid ";
160+
const borderStylePrefix = "inset 2px 0 ";
161161
if (status === CoverageStatus.COVERED) {
162-
line.style.borderLeft = `${borderStylePrefix} ${colors.green}`;
162+
line.style.boxShadow = `${borderStylePrefix} ${colors.green}`;
163163
} else if (status === CoverageStatus.UNCOVERED) {
164-
line.style.borderLeft = `${borderStylePrefix} ${colors.red}`;
164+
line.style.boxShadow = `${borderStylePrefix} ${colors.red}`;
165165
} else if (status === CoverageStatus.PARTIAL) {
166-
line.style.borderLeft = `${borderStylePrefix} ${colors.yellow}`;
166+
line.style.boxShadow = `${borderStylePrefix} ${colors.yellow}`;
167167
} else {
168-
line.style.borderLeft = "inherit";
168+
line.style.boxShadow = "inherit";
169169
}
170170
}
171171

172172
function clearAnimationAndAnnotations() {
173173
clearAnimation(lineSelector, annotateLine);
174-
clearAnnotations((line: HTMLElement) => (line.style.borderLeft = "inherit"));
174+
clearAnnotations((line: HTMLElement) => (line.style.boxShadow = "inherit"));
175175
}
176176

177177
main();

0 commit comments

Comments
 (0)