From daa94f9a619716b4993eb7acab37c62feab91574 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 15 Apr 2022 19:45:36 -0700 Subject: simplify centring css --- manifest.json | 2 +- style.css | 41 ++++++++++++----------------------------- tempo.html | 10 ++-------- tempo.js | 4 ++-- 4 files changed, 17 insertions(+), 40 deletions(-) diff --git a/manifest.json b/manifest.json index b752d9a..3812577 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Tempo", - "version": "0.10", + "version": "0.11", "description": "Replace new tab page with a clock.", "icons": { diff --git a/style.css b/style.css index 2b4ac4c..0466928 100644 --- a/style.css +++ b/style.css @@ -2,47 +2,30 @@ body { color: #ddd; background-color: #222; font-family: 'Lato', sans-serif; - padding: 0em; - margin: 0em; - user-select: none; -} -div#container { - width: 50em; - height: 12em; - margin: auto; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; + height: 100vh; + margin: 0; + padding: 0; - cursor: default; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; } div#time { - line-height: 8em; -} - -div#time p { font-size: 8em; font-weight: 100; - text-align: center; - padding: 0em; - margin: 0em; + line-height: 1em; } div#date { - margin-top: 1em; - line-height: 1.6em; -} - -div#date p { color: #777; font-size: 1.6em; font-weight: 300; - text-align: center; - padding: 0em; - margin: 0em; + line-height: 1em; + + margin-top: 1rem; + margin-bottom: 1.2rem; } diff --git a/tempo.html b/tempo.html index d504dc3..0425653 100644 --- a/tempo.html +++ b/tempo.html @@ -9,13 +9,7 @@ -
-
-

 

-
-
-

 

-
-
+
 
+
 
diff --git a/tempo.js b/tempo.js index 4380603..12261b5 100644 --- a/tempo.js +++ b/tempo.js @@ -24,8 +24,8 @@ function updateTime() { '\u00A0\u00A0' + padTime(s); let str_d = dd + ' ' + months[dm] + ' ' + dy; - document.getElementById('timeval').textContent = str_t; - document.getElementById('dateval').textContent = str_d; + document.getElementById('time').textContent = str_t; + document.getElementById('date').textContent = str_d; } function startTempo() { -- cgit v1.2.3-70-g09d2