do frontend (preact)
This commit is contained in:
101
web/src/styles/leaderboard.scss
Normal file
101
web/src/styles/leaderboard.scss
Normal file
@@ -0,0 +1,101 @@
|
||||
@use 'variables';
|
||||
|
||||
$star-color-variants: (
|
||||
'golden': golden-star,
|
||||
'silver': silver-star,
|
||||
'unachieved': text-muted,
|
||||
'unavailable': text-muted,
|
||||
);
|
||||
|
||||
@mixin star-color-variant($name) {
|
||||
color: var(--#{$name}-500);
|
||||
|
||||
&:hover {
|
||||
color: var(--#{$name}-400);
|
||||
}
|
||||
}
|
||||
|
||||
table.leaderboard {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
|
||||
border: 2px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
overflow: hidden;
|
||||
|
||||
tr.status>td {
|
||||
font-size: 0.9em;
|
||||
height: 1.5em;
|
||||
|
||||
color: var(--text-muted);
|
||||
background-color: var(--surface-muted);
|
||||
|
||||
border-top: 2px solid var(--border);
|
||||
border-bottom: 2px solid var(--border);
|
||||
}
|
||||
|
||||
tr:not(.status) {
|
||||
|
||||
&>td:nth-child(1),
|
||||
&>th:nth-child(1),
|
||||
&>td:nth-child(3),
|
||||
&>th:nth-child(3),
|
||||
&>td:nth-child(4),
|
||||
&>th:nth-child(4) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&>td:nth-child(1) {
|
||||
color: var(--text-muted);
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
height: 2.5em;
|
||||
color: var(--primary);
|
||||
font-size: 1.25em;
|
||||
font-weight: 500;
|
||||
text-align: left;
|
||||
|
||||
padding-inline: 0.6rem;
|
||||
}
|
||||
|
||||
td {
|
||||
height: 2em;
|
||||
padding-inline: 0.6rem;
|
||||
}
|
||||
|
||||
tbody tr:not(.status-row) {
|
||||
&:hover {
|
||||
background: var(--surface);
|
||||
}
|
||||
}
|
||||
|
||||
tr .star {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
width: 0.5rem;
|
||||
|
||||
&:is(th, td) {
|
||||
padding: 0.2em;
|
||||
text-align: center;
|
||||
|
||||
// border-left: 0.5px solid var(--border);
|
||||
// border-right: 0.5px solid var(--border);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:is(td) .tooltip {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
@each $class, $color in $star-color-variants {
|
||||
&.#{$class} {
|
||||
@include star-color-variant($color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user