fix: keep the footer brand column readable on narrow viewports
This commit is contained in:
@@ -556,6 +556,25 @@ class Redesign(unittest.TestCase):
|
||||
with self.subTest(needle=needle):
|
||||
self.assertIn(needle, js)
|
||||
|
||||
def test_footer_grid_keeps_a_readable_brand_column(self):
|
||||
"""Regression: the brand track was `minmax(0,1.5fr)`, so the 9rem auto-fit
|
||||
link columns squeezed it to a few pixels between roughly 390px and 960px and
|
||||
the "Kontakt"/"Netzwerk" headings overlapped the logo and the claim. The
|
||||
brand column must keep a real minimum and the narrow layout must give the
|
||||
brand a full-width row."""
|
||||
css = read(SITE / "assets" / "site.css")
|
||||
grid = re.search(r"\.footer__grid\{[^}]*\}", css)
|
||||
self.assertIsNotNone(grid, "footer grid rule missing")
|
||||
self.assertIn("minmax(15rem,1.5fr)", grid.group(0))
|
||||
self.assertNotIn("minmax(0,1.5fr)", grid.group(0))
|
||||
narrow = re.search(r"@media \(max-width:52rem\)\{(?:(?!\n\}).)*?\n\}", css, re.S)
|
||||
self.assertIsNotNone(narrow, "52rem breakpoint missing")
|
||||
self.assertIn(".footer__brand{grid-column:1/-1}", narrow.group(0))
|
||||
self.assertIn(".footer__grid{grid-template-columns:repeat(2,minmax(0,1fr))}", narrow.group(0))
|
||||
# Long unbreakable tokens (the e-mail address) must wrap instead of spilling
|
||||
# out of a narrow column.
|
||||
self.assertIn(".footer__links{display:grid;gap:.5rem;overflow-wrap:anywhere}", css)
|
||||
|
||||
|
||||
class Release(unittest.TestCase):
|
||||
def test_deploy_removes_only_targeted_desfoto_labels(self):
|
||||
|
||||
Reference in New Issue
Block a user