summaryrefslogtreecommitdiffstats
path: root/sitestatic
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@archlinux.org>2019-06-15 18:02:54 +0200
committerJelle van der Waa <jelle@archlinux.org>2019-06-15 18:02:54 +0200
commit3b432bc1247a0597c6284999bb2963ac204ad6a7 (patch)
treefcb8cece14494da29576a26db9554a5d9af91522 /sitestatic
parent555beff6f547da9371924e8676ddfff25305558d (diff)
downloadarchweb-3b432bc1247a0597c6284999bb2963ac204ad6a7.tar.gz
archweb-3b432bc1247a0597c6284999bb2963ac204ad6a7.zip
templates: redo even/odd CSS with nth-childrelease_2019-06-15
Instead of adding odd and even classes on every td use a more modern CSS solution with nth-child(even) and odd. Closes: #206 Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
Diffstat (limited to 'sitestatic')
-rw-r--r--sitestatic/archweb.css18
1 files changed, 10 insertions, 8 deletions
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css
index 2dc5be15..f95e3843 100644
--- a/sitestatic/archweb.css
+++ b/sitestatic/archweb.css
@@ -687,14 +687,6 @@ table.results {
padding: .3em 1em .3em 3px;
}
- .results tr.odd {
- background: #fff;
- }
-
- .results tr.even {
- background: #e4eeff;
- }
-
.results .flagged {
color: red;
}
@@ -977,6 +969,16 @@ table td.country {
background: #ffd;
}
+.results tr:nth-child(even),
+#article-list tr:nth-child(even) {
+ background: #e4eeff;
+}
+
+.results tr:nth-child(odd),
+#article-list tr:nth-child(odd) {
+ background: #fff;
+}
+
/* dev dashboard: */
table.dash-stats .key {
width: 50%;