From 8bb51556b8870fd894f12085171165ac82794eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 19 Mar 2020 14:16:12 +0100 Subject: Change calendar table to be css grid. --- static/style.css | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'static/style.css') diff --git a/static/style.css b/static/style.css index 11565ff7..810fa0b4 100644 --- a/static/style.css +++ b/static/style.css @@ -117,20 +117,30 @@ body { flex-grow: 1; } -main table { - width: 100%; - height: 90%; /* TODO */ - border-collapse: collapse; +/* ---------------------------------------- */ + +.caltable { + flex-grow: 10; + + display: grid; + grid-template-columns: repeat(7, 1fr); + /* This is for the first name, the week days. + NOTE that I'm not sure this is actually the + correct way to do it. */ + grid-template-rows: 2em; } -main table thead { - height: 1em; +.caltable .thead { + font-weight: bold; + text-align: center; } -main table td { - width: calc(100%/7); +.caltable div { + border: 1px solid gray; } +/* ---------------------------------------- */ + .calendar { width: 100%; height: 100%; -- cgit v1.2.3