moved coloring to css file

This commit is contained in:
Spencer Florence 2014-12-30 14:07:21 -06:00
parent 94defd5fc2
commit c01a64fa42
2 changed files with 17 additions and 7 deletions

View File

@ -129,12 +129,12 @@
'((br ()))))
(define (mode-xml mode body)
(define color
(define class
(case mode
[(yes) "green"]
[(no) "red"]
[(missing) "black"]))
`(span ((style ,(string-append "color:" color))) ,@body))
[(yes) "covered"]
[(no) "uncovered"]
[(missing) "missing"]))
`(span ((class ,class)) ,@body))
(module+ test
(define (test file out)
@ -145,5 +145,5 @@
(clear-coverage!))
(define f (path->string (simplify-path path)))
(test f
`((span ((style "color:green"))
`((span ((class "covered"))
,@(encode-string (file->string f))))))

View File

@ -1,3 +1,13 @@
.code {
font-family: "Lucida Console", Monaco, monospace;
}
}
.uncovered {
color:red;
}
.covered {
color:green;
}
.missing {}