Lexicon / Scroll-driven · 9 of 13

09 / Scroll-driven

Path Drawing

The line draws itself as you arrive, as though someone were tracing it in front of you.

The march, drawn again

In 1869 Charles Joseph Minard drew the French army’s march on Moscow in 1812 as a band as wide as the army: rose going in, black coming out, and under it the cold. Scroll, and his bands draw themselves again.

Minard’s map of the French army in Russia, 1812–13: a rose band as wide as the army runs from the Niemen at Kowno to Moscow, narrowing from 422,000 men to 100,000; a black band brings the army back, narrowing to 10,000; beneath, a table of the temperatures on the retreat, falling to −30° Réaumur

Going in, from 24 June 1812 · roseIn Moscow, from 14 SeptemberComing out · black · the cold, in degrees Réaumur

  1. 422,000 Kowno
  2. 400,000 Kowno → Wilna
  3. 175,000 Witebsk → Smolensk
  4. 145,000 Smolensk
  5. 127,100 Chjat → Mojaisk
  6. 100,000 Mojaisk
  7. 100,000 Moscou
  8. 100,000 Moscou
  9. 96,000 Malo-jarosewli → Mojaisk
  10. 87,000 Mojaisk → Wizma
  11. 55,000 Wizma → Dorogobouge
  12. 37,000 Dorogobouge → Smolensk
  13. 24,000 Smolensk → Orscha
  14. 20,000 Orscha → Bobr
  15. 50,000 Bobr → Studienska
  16. 28,000 Studienska → Molodezno
  17. 12,000 Molodezno → Smorgoni
  18. 14,000 Smorgoni → Wilna
  19. 8,000 Wilna
  20. 4,000 Wilna → Kowno
  21. 10,000 Kowno
  1. Zéro 18 October
  2. −9° 9 November
  3. −21° 14 November
  4. −11°
  5. −20° 28 November
  6. −24° 1 December
  7. −30° 6 December
  8. −26° 7 December

also called stroke-dashoffset scrub · line draw · SVG path reveal

The robustness trick is pathLength="1": it normalises any path to a length of one, so the same two lines of CSS draw any shape without measuring it in JavaScript first. Nothing is redrawn: the bands are Minard’s lithograph. Each starts under a veil the colour of the paper, blended so that it lifts only ink, and a pen, one stroke-dashoffset in the veil’s mask, takes the veil away along the line. The black band keeps his calendar: the dates in his table of the cold, each tied to a place on the retreat by one of his thin vertical lines, set its pace, and the thermometer draws itself in step. Étienne-Jules Marey praised the map’s “brutal eloquence, which seems to defy the pen of the historian”.

How it is built.veil { background: #BAAE99; mix-blend-mode: lighten; mask: url(#veil-advance) } /* lifts only the ink */ <mask id="veil-advance"> <path d="…" stroke="#fff"/> <!-- the band, veiled --> <path class="pen" d="…" stroke="#000" pathLength="1"/> </mask> <!-- the pen takes the veil away --> .pen { stroke-dasharray: 1; animation: draw linear both; animation-timeline: --march } @keyframes draw { from { stroke-dashoffset: 1 } to { stroke-dashoffset: 0 } }

In full, on GitHub index.html showcase.css

Map — Carte figurative des pertes successives en hommes de l’Armée Française dans la campagne de Russie 1812–1813, drawn by Charles Joseph Minard, Paris, 20 November 1869 (printed with its companion, Hannibal’s march); Bibliothèque nationale de France, via Gallica; public domain, via Wikimedia Commons. The figures, places and readings are Minard’s, as written on the map. Facts — Charles Joseph Minard; French invasion of Russia.