Skip to content

Commit b7f6c23

Browse files
committed
fix: clicking on test keeps test in the viewport
1 parent 2d27210 commit b7f6c23

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ func printTest(s formatter.JUnitTestSuite, c formatter.JUnitTestCase) {
2626
if k != nil {
2727
class, text = "skipped", "Skip"
2828
}
29-
fmt.Printf("<div class='%s'>\n", class)
29+
fmt.Printf("<div class='%s' id='%s'>\n", class, id)
3030
fmt.Printf("<a href='#%s'>%s <span class='badge'>%s</span></a>\n", id, c.Name, text)
31-
fmt.Printf("<div class='expando' id='%s'>\n", id)
31+
fmt.Printf("<div class='expando'>\n")
3232
if f != nil {
3333
fmt.Printf("<div class='content'>%s</div>\n", f.Contents)
3434
} else if k != nil {

style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ a {
6969
font-size: x-small;
7070
}
7171

72-
.expando:target {
72+
div:target .expando {
7373
display: block
7474
}

0 commit comments

Comments
 (0)