From: Carl Worth Date: Sun, 24 May 2020 15:43:13 +0000 (-0700) Subject: Fix padding calculations for intermediate widths X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=bdf1eb444045a785f02bd41c09c49c165a48c665 Fix padding calculations for intermediate widths I just noticed that at some intermediate browser widths the page padding was entirely missing. Fortunately, "git bisect" was very useful and pointed me to the exact problematic commit: 93245be0a5db82eadd4fb532d27fa4fbea63a2ac In that commit we were trying to move the range of media block from 620:720 to instead be 720:820 (to account for the change in the box-sizing parameter now including 100 units of padding). But that commit was botched in a couple of ways, (applying from 620:820 and also miscalculating everything within that range). This commit corrects things and is verified to act as desired when applied to the broken commit mentioned above and when applied at the current point in the code history. --- diff --git a/style.css b/style.css index 2fca630..dfaa8e4 100644 --- a/style.css +++ b/style.css @@ -124,10 +124,10 @@ body { padding-right: 1em; } -@media screen and (min-width: 620px) and (max-width: 820px) { +@media screen and (min-width: 720px) and (max-width: 820px) { #page { - padding-left: calc(1em + (100% - 820px)/2); - padding-right: calc(1em + (100% - 820px)/2); + padding-left: calc(1em + (100% - 720px)/2); + padding-right: calc(1em + (100% - 720px)/2); } }