From ac455a520ca15d83a818fe55d2bf4de5dc696a94 Mon Sep 17 00:00:00 2001 From: zcorpan Date: Fri, 20 Dec 2024 13:37:30 +0100 Subject: [PATCH] Add table sorting Fixes #1120. --- index.html | 88 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 80 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index eb54a75..181af77 100644 --- a/index.html +++ b/index.html @@ -98,9 +98,9 @@ td.more-info :any-link:not([title="Discussion"]) { padding: 0; text-decoration: none; } td.link :any-link { padding: 0.25rem; } th.concerns { width: 7em; } - th.position { width: 4em; } + th.position { width: 4.25em; } th.topics { width: 3.5em; } - th.venues { width: 3.5em; } + th.venues { width: 4em; } th.more-info { width: 9.5em; } th, td { padding: 0.5rem; } th.link { width: 3em; text-align: center; } @@ -126,6 +126,14 @@ span.negative { background-color: var(--negative-bg-color); color: var(--negative-color); } span.neutral { border-color: currentColor; } span.defer, span.under-consideration { background-color: var(--defer-bg-color); color: var(--defer-color); } + + /* sorting */ + th.sortable { padding-top: 0; padding-bottom: 0; } + th button { appearance: none; padding: 0.25em 0; font: inherit; display: inline; background-color: transparent; border: none; cursor: default; user-select: none; } + th button::after { font-size: 0.8125em; content: " ▼"; opacity: 0.3; } + th button:hover::after, th button:focus::after { opacity: 0.6 } + th[aria-sort] button::after { opacity: 1; } + th[aria-sort="descending"] button::after { content: " ▲"; }