From d9f19e180af6c33f9ade3a05d4025c642beda7e8 Mon Sep 17 00:00:00 2001 From: Rob Date: Mon, 23 Dec 2019 13:56:31 -0800 Subject: [PATCH] Fine tune text alignment for table cells, add another reference,and improve the comments for the selector near the top. --- sscaffold.css | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sscaffold.css b/sscaffold.css index 947e03a..605cdf1 100644 --- a/sscaffold.css +++ b/sscaffold.css @@ -25,9 +25,14 @@ html { body { - /* The following three lines are from [4] */ + /* Ensure that the page body fills the display even if the content does not. [4] */ min-height: 100vh; + /* Smoothly scroll between anchors. [4] */ scroll-behavior: smooth; + /* optimizeLegibility may cause some performance issues in some browsers + (https://marco.org/2012/11/15/text-rendering-optimize-legibility) -- not sure if + this is still current. Probably safe to assume that an appropriately legible + font will be used anyway. [4] */ text-rendering: optimizeSpeed; } @@ -197,6 +202,14 @@ sup { } +td:not([align]), +th:not([align]) { + /* Borrow a rule from [5], modifying a rule from [2] to give table cells + a default left alignment unless alignment is specified in the element. */ + text-align: left; +} + + button, input, optgroup, @@ -744,7 +757,6 @@ td, th { border-bottom: 0.1rem solid #e1e1e1; padding: 1.2rem 1.5rem; - text-align: left; } @@ -1051,5 +1063,6 @@ legend.inline { * [2] milligram.css, https://github.com/milligram/milligram/ * [3] https://css-tricks.com/box-sizing/ * [4] https://hankchizljaw.com/wrote/a-modern-css-reset/ +* [5] https://github.com/jgthms/minireset.css/ * ******************************************************************************/