2020-02-26 19:56:46 +01:00
|
|
|
:root {
|
|
|
|
--body-background-color: hsl(0, 0%, 100%);
|
|
|
|
--body-color: hsl(0, 0%, 25%);
|
2020-11-03 14:56:25 +01:00
|
|
|
--table-sticky-background-color: hsl(0, 0%, 92%);
|
2020-02-26 22:05:46 +01:00
|
|
|
--link-color: hsl(210, 90%, 50%);
|
2020-06-27 00:42:30 +02:00
|
|
|
--completion-complete-color: hsl(125, 60%, 35%);
|
2020-02-26 19:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
:root {
|
2020-12-20 23:51:41 +01:00
|
|
|
--body-background-color: hsl(180, 5%, 15%);
|
|
|
|
--body-color: hsl(0, 0%, 80%);
|
|
|
|
--table-sticky-background-color: hsl(180, 5%, 15%);
|
|
|
|
--link-color: hsl(200, 50%, 60%);
|
2020-06-27 00:42:30 +02:00
|
|
|
--completion-complete-color: hsl(125, 50%, 65%);
|
2020-02-26 19:56:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
background-color: var(--body-background-color);
|
|
|
|
color: var(--body-color);
|
|
|
|
/* Use a modern font stack inspired by Bootstrap 4. */
|
|
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
|
|
}
|
|
|
|
|
2020-03-23 22:31:47 +01:00
|
|
|
h1,
|
|
|
|
p {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
2020-02-26 22:05:46 +01:00
|
|
|
a {
|
|
|
|
color: var(--link-color);
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
a:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
2020-02-26 19:56:46 +01:00
|
|
|
table {
|
|
|
|
border-collapse: collapse;
|
2020-03-23 22:31:47 +01:00
|
|
|
margin: 2rem auto 0 auto;
|
2020-02-26 19:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
|
|
border: 1px solid hsla(0, 0%, 50%, 50%);
|
|
|
|
padding: 0.25rem 0.5rem;
|
2020-03-23 22:32:05 +01:00
|
|
|
/* Prefer horizontal scrolling to wrapping over several lines. */
|
|
|
|
white-space: nowrap;
|
2020-02-26 19:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tr:hover {
|
2020-02-26 22:06:03 +01:00
|
|
|
background-color: hsla(210, 90%, 50%, 12.5%);
|
2020-02-26 19:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
tr:nth-child(even) {
|
|
|
|
background-color: hsla(0, 0%, 50%, 10%);
|
|
|
|
}
|
|
|
|
|
|
|
|
tr:nth-child(even):hover {
|
2020-02-26 22:06:03 +01:00
|
|
|
background-color: hsla(210, 90%, 50%, 15%);
|
2020-02-26 19:56:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Align class names to the right for better readability and highlight them. */
|
|
|
|
td:first-child {
|
|
|
|
font-weight: bold;
|
|
|
|
text-align: right;
|
|
|
|
}
|
2020-06-27 00:42:30 +02:00
|
|
|
|
2020-11-02 20:27:22 +01:00
|
|
|
/* Sticky header for the table. */
|
|
|
|
th {
|
2020-11-03 14:56:25 +01:00
|
|
|
background: var(--table-sticky-background-color);
|
2020-11-02 20:27:22 +01:00
|
|
|
box-shadow: 0px 2px 2px 0px rgb(0, 0, 0, 25%);
|
|
|
|
padding: 4px 2px;
|
|
|
|
position: -webkit-sticky;
|
|
|
|
position: sticky;
|
|
|
|
z-index: 1; /* Show on top of table cells. */
|
|
|
|
top: 0; /* Stick to the top of the screen. */
|
2023-10-11 23:06:11 +02:00
|
|
|
cursor: pointer; /* Visually hint that headers can be interacted with. */
|
2020-11-02 20:27:22 +01:00
|
|
|
}
|
|
|
|
th:first-child {
|
2020-11-03 14:56:25 +01:00
|
|
|
border-left: 1px solid var(--table-sticky-background-color); /* Fixes left border during scroll; must have a valid color, transparent doesn't work. */
|
2020-11-02 20:27:22 +01:00
|
|
|
}
|
|
|
|
|
2020-06-27 00:42:30 +02:00
|
|
|
.completion-complete {
|
|
|
|
color: var(--completion-complete-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Dynamic coloring depending on the completion percentage. */
|
|
|
|
/* Will be fully red at (roughly) 50% completion, and black/white (depending on the theme) at 99%. */
|
|
|
|
.completion-incomplete {
|
|
|
|
font-weight: bold;
|
|
|
|
color: rgb(calc(320 - calc(var(--percentage) * 3.2)), 64, 64);
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
.completion-incomplete {
|
|
|
|
--green-blue: calc(80 + calc(var(--percentage) * 2));
|
|
|
|
color: rgb(255, var(--green-blue), var(--green-blue));
|
|
|
|
}
|
|
|
|
}
|