forked from rosa/hakurei
cmd/pkgserver: fix dark mode in test web UI
This commit is contained in:
62
cmd/pkgserver/ui/static/_test_common.scss
Normal file
62
cmd/pkgserver/ui/static/_test_common.scss
Normal file
@@ -0,0 +1,62 @@
|
||||
html {
|
||||
background-color: var(--bg);
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
h1, p, summary {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.root {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
details.test-node {
|
||||
margin-left: 1rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
border-left: 2px dashed var(--fg);
|
||||
> summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
&.success > summary::marker {
|
||||
/*
|
||||
* WebKit only supports color and font-size properties in ::marker, and
|
||||
* its ::-webkit-details-marker doesn't seem to work whatsoever; thus,
|
||||
* set a color as a fallback: while it may be confusing for colorblind
|
||||
* individuals, it's better than no indication of a test's state.
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::marker#browser_compatibility
|
||||
*/
|
||||
color: var(--fg);
|
||||
/* content set in theme-specific file. */
|
||||
}
|
||||
&.failure > summary::marker {
|
||||
color: red;
|
||||
content: url("/static/failure-closed.svg");
|
||||
}
|
||||
&.failure[open] > summary::marker {
|
||||
content: url("/static/failure-open.svg");
|
||||
}
|
||||
&.skip > summary::marker {
|
||||
color: blue;
|
||||
content: url("/static/skip-closed.svg");
|
||||
}
|
||||
&.skip[open] > summary::marker {
|
||||
content: url("/static/skip-open.svg");
|
||||
}
|
||||
}
|
||||
|
||||
p.test-desc {
|
||||
margin: 0 0 0 1rem;
|
||||
padding: 2px 0;
|
||||
> pre {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
Reference in New Issue
Block a user