Skip to content

Commit 8ab9a0e

Browse files
committed
Split the hero stat strip at the layout floor (v2.10.1)
The live smoke suite went red on 2026-08-17: the homepage at 320px pushed the document 5px wider than the viewport. The lead KPI row claimed four across at every width, which the numerals can honour and the labels cannot — a quarter of a 320px viewport is a 60px cell, and REFERENCES sets 91px there (RÉFÉRENCES the same), so the last label ran past the container. Nothing rescues four-across down there. At the --text-2xs floor with the tracking closed the word is still 72px, and only a zero gap — which would fuse the four rules into a single line — opens the cell that far. Breaking it yields REFERE / NCES: `hyphens: auto` is inert because Chrome ships no hyphenation dictionary for either site's lang, so the fallback chops mid-word. So the strip splits 2x2 below $xs and every label stays whole. Between $xs and $sm the row is four across in an 80px cell, still short of 91px, so the label drops to the type floor with its tracking closed for that band only — the common phone widths all land in it. The list also gains width: 100%; it is shrink-to-fit and only ever filled the column because four labels out-measured the space, so at 2-up the ruled strip stopped 91px short of the search box above it. Same defect one tier down, French only: six substats across from $md is a 97px cell at 768 and AUDIOVISUELLES sets 117px, overrunning its rule on the most common tablet width. Same fix, over the $md-$lg band. Verified against the proxy with local CSS at 14 widths from 320 to 1024 in both languages: no document overflow, no label wider than its own rule, no label wrapped. The full live suite passes there, mobile assertion included.
1 parent 0fcb0cd commit 8ab9a0e

7 files changed

Lines changed: 60 additions & 17 deletions

File tree

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ authors:
2828
given-names: Frédérick
2929
orcid: "https://orcid.org/0000-0003-0959-2092"
3030
affiliation: "University of Bayreuth"
31-
version: "2.10.0"
32-
date-released: "2026-08-14"
31+
version: "2.10.1"
32+
date-released: "2026-08-17"
3333
license: GPL-3.0-or-later
3434
repository-code: "https://github.com/fmadore/IWAC-theme"
3535
url: "https://islam.zmo.de/s/westafrica/"

asset/css/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

asset/sass/components/banner/_banner.scss

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -343,20 +343,44 @@
343343
// .banner__stats — the four live breadth counts (lead figures)
344344
// .banner__substats — six precomputed corpus-depth figures (smaller, quieter)
345345
//
346-
// Both are CSS grids, not flex-wrap. The lead tier holds a single row of
347-
// four at EVERY width — the numerals scale down on narrow screens instead
348-
// of wrapping to a ragged 2×2 (which read as loose and unaligned). Each
349-
// cell carries its own 2px rule, so the row reads as one continuous ruled
350-
// strip. The featured figure (total items) gets the solid-white rule.
346+
// Both are CSS grids, not flex-wrap. Each cell carries its own 2px rule, so
347+
// a row reads as one continuous ruled strip. The featured figure (total
348+
// items) gets the solid-white rule.
349+
//
350+
// The lead tier holds one row of four from $xs up, and splits 2×2 only at
351+
// the layout floor. It used to claim four at EVERY width, on the grounds
352+
// that the numerals scale down instead of wrapping to a ragged 2×2 — true
353+
// of the numerals, false of the labels, which is what actually sets the
354+
// floor. A quarter of a 320px viewport is a 60px cell; REFERENCES sets
355+
// 91px there and RÉFÉRENCES the same, so the last label ran past the
356+
// container and pushed the document 3-5px wider than the viewport (caught
357+
// by the live smoke test's mobile overflow assertion, red 2026-08-17).
358+
// Nothing rescues four-across at that width: even at the --text-2xs floor
359+
// with the tracking closed the word is 72px, and only a zero gap — which
360+
// would fuse the four rules into one line — opens the cell that far.
361+
// Breaking the word gives REFERE / NCES (`hyphens: auto` is inert; Chrome
362+
// ships no dictionary for either site's lang), which is worse than a second
363+
// row. So the strip splits once, at the floor, and every label stays whole.
351364
&__stats {
352365
display: grid;
353-
grid-template-columns: repeat(4, minmax(0, 1fr));
366+
grid-template-columns: repeat(2, minmax(0, 1fr));
367+
// Span the content column. The list is shrink-to-fit, and four across
368+
// only ever filled it because four single-word labels out-measured the
369+
// space available; at 2-up their max-content is 197px of a 288px
370+
// column, which left the ruled strip stopping short of everything
371+
// stacked above it. The rules have to reach the same right edge as the
372+
// search box or the ledger reads as broken.
373+
width: 100%;
354374
gap: var(--space-5) var(--space-4);
355375
margin-block-start: var(--space-8);
356376
margin-block-end: 0;
357377
padding: 0;
358378
list-style: none;
359379

380+
@media (min-width: $xs) {
381+
grid-template-columns: repeat(4, minmax(0, 1fr));
382+
}
383+
360384
@media (min-width: $md) {
361385
gap: var(--space-6) var(--space-6);
362386
margin-block-start: var(--space-10);
@@ -380,9 +404,9 @@
380404
display: block;
381405
font-family: $font__headings;
382406
// Scale the lead numerals across the breakpoints so four stay on one
383-
// line down to ~320px. text-lg keeps "14 723" inside a quarter-viewport
384-
// cell on the smallest phones; the figure grows to the full display
385-
// size on desktop.
407+
// line down to $xs, where the row splits 2×2. text-lg keeps "14 723"
408+
// inside a quarter-viewport cell on small phones; the figure grows to
409+
// the full display size on desktop.
386410
font-size: var(--text-lg);
387411
font-weight: 800;
388412
line-height: 1;
@@ -415,6 +439,16 @@
415439
text-transform: uppercase;
416440
letter-spacing: var(--tracking-wide);
417441
color: color-mix(in oklab, var(--white) 92%, transparent);
442+
443+
// Between $xs and $sm the row is four across in an 80px cell, which
444+
// REFERENCES overruns at --text-xs (91px). Close the tracking and drop
445+
// to the type floor for that band only — 72px, inside the cell — then
446+
// take the full size back once the cell can hold it. The common phone
447+
// widths (390, 393, 412, 414, 428) all land in here.
448+
@media (min-width: $xs) and (max-width: #{$sm - 1px}) {
449+
font-size: var(--text-2xs);
450+
letter-spacing: normal;
451+
}
418452
}
419453

420454
// Secondary tier — corpus depth. Smaller numerals, half-weight rules, so it
@@ -474,6 +508,15 @@
474508
// Small uppercase labels over the composited plate need ≥92% white
475509
// for AA — the hierarchy vs the lead figures comes from size/weight.
476510
color: color-mix(in oklab, var(--white) 92%, transparent);
511+
512+
// Same trade as __stat-label, one tier down: six across from $md is a
513+
// ~97px cell at 768, and the French AUDIOVISUELLES sets 117px there —
514+
// 20px past its own rule, on the most common tablet width. English
515+
// clears it, so this only ever showed on one site.
516+
@media (min-width: $md) and (max-width: #{$lg - 1px}) {
517+
font-size: var(--text-2xs);
518+
letter-spacing: normal;
519+
}
477520
}
478521
}
479522

asset/sass/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Theme URI: https://github.com/fmadore/IWAC-theme
44
Author: Frédérick Madore
55
Author URI: https://www.frederickmadore.com/
66
Description: Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection
7-
Version: 2.10.0
7+
Version: 2.10.1
88
Omeka Version Constraint: ^4.2.0
99
Requires PHP: ^8.1
1010
License: GNU General Public License v3 or later

config/theme.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[info]
22
name = "IWAC Theme"
3-
version = "2.10.0"
3+
version = "2.10.1"
44
author = "Frédérick Madore"
55
description = "Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection at ZMO Berlin. Features light/dark mode toggle and multilingual support."
66
theme_link = "https://github.com/fmadore/IWAC-theme"

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iwac-theme",
3-
"version": "2.10.0",
3+
"version": "2.10.1",
44
"description": "Islam West Africa Collection Theme - A customized Omeka S theme for the IWAC digital collection.",
55
"main": "gulpfile.js",
66
"scripts": {

0 commit comments

Comments
 (0)