]> git.cworth.org Git - lmno.games/commitdiff
Apply our selected text color to haeaders (h1 and h2)
authorCarl Worth <cworth@cworth.org>
Sun, 17 May 2020 15:47:54 +0000 (08:47 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 17 May 2020 15:50:40 +0000 (08:50 -0700)
This was previously happening in the empires client, but now we move
this up to the top-level.

Note that we don't use the selected text color at minimal font sizes
(such as in the "body" element in general). This is because we want a
high contrast there for maximal legibility. So we introduce an
additional named --text-fo-color-max-contrast which is set to pure
black.

empires/style.css
style.css

index 98bb33a5314472c968963075190455ccf8fe50c0..f7c9e4cf4980629786b7152fafad575221cbf891 100644 (file)
@@ -1,11 +1,3 @@
-h1 {
-    color: #333738;
-}
-
-h2 {
-    color: #333738;
-}
-
 p,dl,dd {
     margin-bottom: 1em;
 }
 p,dl,dd {
     margin-bottom: 1em;
 }
index a3219e20821c34956fc5e0fabdbb2a1fddf6cd23..095f6023f0c84362fdd74a84560c87a2e73f8e07 100644 (file)
--- a/style.css
+++ b/style.css
@@ -10,6 +10,7 @@
 :root {
     /* Standard colors for text. */
     --text-fg-color: #333738;
 :root {
     /* Standard colors for text. */
     --text-fg-color: #333738;
+    --text-fg-color-max-contrast: black;
     --text-bg-color: white;
     --outside-page-bg-color: #333738;
 
     --text-bg-color: white;
     --outside-page-bg-color: #333738;
 
 
 /*\
 |*|
 
 /*\
 |*|
-|*| Core elements: Sizing and padding
+|*| Core elements: Sizing, padding, and application of theme colors
 |*|
 \*/
 
 body {
     line-height: 1.25;
     font-family: sans-serif;
 |*|
 \*/
 
 body {
     line-height: 1.25;
     font-family: sans-serif;
+    color: var(--text-fg-color-max-contrast);
 }
 
 h1 {
 }
 
 h1 {
+    color: var(--text-fg-color);
     font-size: 150%;
     font-weight: bold;
 }
 
 h2 {
     font-size: 150%;
     font-weight: bold;
 }
 
 h2 {
+    color: var(--text-fg-color);
     font-size: 110%;
     font-weight: bold;
 }
     font-size: 110%;
     font-weight: bold;
 }