Repos / hi.imnhan.com / d05785e2d6
commit d05785e2d6412161e3a11aa4e9f7f4871985b786
Author: Bùi Thành Nhân <hi@imnhan.com>
Date:   Tue Feb 2 16:52:58 2021 +0700

    centralized color defs
    
    to make it easier to experiment with colors

diff --git a/nhanb-theme/static/css/main.css b/nhanb-theme/static/css/main.css
index d02c095..a63c6f2 100644
--- a/nhanb-theme/static/css/main.css
+++ b/nhanb-theme/static/css/main.css
@@ -1,6 +1,12 @@
 html {
+  --bg-color: cornsilk;
+  --fg-color: black;
+  --link-color: brown;
+  --hr-border: 2px solid var(--link-color);
+
   font-size: 100%;
-  background-color: cornsilk;
+  background-color: var(--bg-color);
+  color: var(--fg-color);
   /* always show vertical scrollbar to avoid content shifting: */
   overflow-y: scroll;
   font-family: sans-serif;
@@ -12,7 +18,7 @@ body {
 
 a {
   text-decoration: none;
-  color: brown;
+  color: var(--link-color);
 }
 a:hover {
   text-decoration: underline;
@@ -117,7 +123,7 @@ #main {
 }
 
 nav {
-  border: 2px solid brown;
+  border: var(--hr-border);
   border-left: 0;
   border-right: 0;
   margin: 0.8rem auto 1rem auto;
@@ -130,7 +136,7 @@ nav ul {
 
 footer {
   margin-top: 1.5rem;
-  border-top: 2px solid brown;
+  border-top: var(--hr-border);
   padding: 0.5rem 0;
   font-size: 0.9rem;
 }