From ed5747a723b7c9296b5668b5911831f7437cbc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sun, 17 May 2026 17:12:25 -0400 Subject: [PATCH] style: format caption component HTML files --- .../caption-clip-wipe/caption-clip-wipe.html | 6 +++++- registry/components/caption-clip-wipe/demo.html | 6 +++++- .../caption-editorial-emphasis.html | 16 +++++++++++++--- .../caption-editorial-emphasis/demo.html | 16 +++++++++++++--- .../caption-emoji-pop/caption-emoji-pop.html | 14 ++++++++++++-- registry/components/caption-emoji-pop/demo.html | 14 ++++++++++++-- .../caption-glitch-rgb/caption-glitch-rgb.html | 6 +++++- registry/components/caption-glitch-rgb/demo.html | 6 +++++- .../caption-gradient-fill.html | 6 +++++- .../components/caption-gradient-fill/demo.html | 6 +++++- .../caption-kinetic-slam.html | 3 ++- .../components/caption-kinetic-slam/demo.html | 3 ++- .../caption-matrix-decode.html | 6 +++++- .../components/caption-matrix-decode/demo.html | 6 +++++- .../caption-neon-accent/caption-neon-accent.html | 6 +++++- .../components/caption-neon-accent/demo.html | 6 +++++- .../caption-neon-glow/caption-neon-glow.html | 6 +++++- registry/components/caption-neon-glow/demo.html | 6 +++++- .../caption-parallax-layers.html | 12 ++++++++++-- .../components/caption-parallax-layers/demo.html | 12 ++++++++++-- .../caption-particle-burst.html | 6 +++++- .../components/caption-particle-burst/demo.html | 6 +++++- .../caption-typewriter/caption-typewriter.html | 6 +++++- registry/components/caption-typewriter/demo.html | 6 +++++- .../caption-weight-shift.html | 14 ++++++++++++-- .../components/caption-weight-shift/demo.html | 14 ++++++++++++-- 26 files changed, 178 insertions(+), 36 deletions(-) diff --git a/registry/components/caption-clip-wipe/caption-clip-wipe.html b/registry/components/caption-clip-wipe/caption-clip-wipe.html index 94f2e1efb..d93cc69a6 100644 --- a/registry/components/caption-clip-wipe/caption-clip-wipe.html +++ b/registry/components/caption-clip-wipe/caption-clip-wipe.html @@ -192,7 +192,11 @@ grp.className = "wp-group"; grp.id = "wp-grp-" + gi; - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var computedSize = fitFontSize(groupText, 88, "800", "Poppins", 1720); groupWords.forEach(function (w, i) { diff --git a/registry/components/caption-clip-wipe/demo.html b/registry/components/caption-clip-wipe/demo.html index 94f2e1efb..d93cc69a6 100644 --- a/registry/components/caption-clip-wipe/demo.html +++ b/registry/components/caption-clip-wipe/demo.html @@ -192,7 +192,11 @@ grp.className = "wp-group"; grp.id = "wp-grp-" + gi; - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var computedSize = fitFontSize(groupText, 88, "800", "Poppins", 1720); groupWords.forEach(function (w, i) { diff --git a/registry/components/caption-editorial-emphasis/caption-editorial-emphasis.html b/registry/components/caption-editorial-emphasis/caption-editorial-emphasis.html index 57dd43aa3..871fb31c8 100644 --- a/registry/components/caption-editorial-emphasis/caption-editorial-emphasis.html +++ b/registry/components/caption-editorial-emphasis/caption-editorial-emphasis.html @@ -274,12 +274,22 @@ var CLASS_MAP = { n: "word word--normal", i: "word word--italic", e: "word word--emphasis" }; function computeLineSize(linePairs) { - var hasEmphasis = linePairs.some(function (p) { return p[1] === "e"; }); + var hasEmphasis = linePairs.some(function (p) { + return p[1] === "e"; + }); if (hasEmphasis) { - var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" "); + var lineText = linePairs + .map(function (p) { + return W[p[0]].text; + }) + .join(" "); return fitFontSize(lineText, 180, "800", "Playfair Display", SAFE_WIDTH); } - var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" "); + var lineText = linePairs + .map(function (p) { + return W[p[0]].text; + }) + .join(" "); return fitFontSize(lineText, 86, "400", "Inter", SAFE_WIDTH); } diff --git a/registry/components/caption-editorial-emphasis/demo.html b/registry/components/caption-editorial-emphasis/demo.html index 57dd43aa3..871fb31c8 100644 --- a/registry/components/caption-editorial-emphasis/demo.html +++ b/registry/components/caption-editorial-emphasis/demo.html @@ -274,12 +274,22 @@ var CLASS_MAP = { n: "word word--normal", i: "word word--italic", e: "word word--emphasis" }; function computeLineSize(linePairs) { - var hasEmphasis = linePairs.some(function (p) { return p[1] === "e"; }); + var hasEmphasis = linePairs.some(function (p) { + return p[1] === "e"; + }); if (hasEmphasis) { - var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" "); + var lineText = linePairs + .map(function (p) { + return W[p[0]].text; + }) + .join(" "); return fitFontSize(lineText, 180, "800", "Playfair Display", SAFE_WIDTH); } - var lineText = linePairs.map(function (p) { return W[p[0]].text; }).join(" "); + var lineText = linePairs + .map(function (p) { + return W[p[0]].text; + }) + .join(" "); return fitFontSize(lineText, 86, "400", "Inter", SAFE_WIDTH); } diff --git a/registry/components/caption-emoji-pop/caption-emoji-pop.html b/registry/components/caption-emoji-pop/caption-emoji-pop.html index 8f8366a4b..46651434b 100644 --- a/registry/components/caption-emoji-pop/caption-emoji-pop.html +++ b/registry/components/caption-emoji-pop/caption-emoji-pop.html @@ -395,8 +395,18 @@ function buildCaptions(groups) { var stage = document.getElementById("caption-stage"); groups.forEach(function (group, groupIndex) { - var groupText = group.words.map(function (w) { return w.text.toUpperCase(); }).join(" "); - var computedSize = fitFontSize(groupText, CAPTION_FONT_SIZE, "900", "Gabarito", SAFE_ZONE_WIDTH); + var groupText = group.words + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); + var computedSize = fitFontSize( + groupText, + CAPTION_FONT_SIZE, + "900", + "Gabarito", + SAFE_ZONE_WIDTH, + ); var groupEl = document.createElement("div"); groupEl.id = "caption-group-" + groupIndex; groupEl.className = "caption-group"; diff --git a/registry/components/caption-emoji-pop/demo.html b/registry/components/caption-emoji-pop/demo.html index 8f8366a4b..46651434b 100644 --- a/registry/components/caption-emoji-pop/demo.html +++ b/registry/components/caption-emoji-pop/demo.html @@ -395,8 +395,18 @@ function buildCaptions(groups) { var stage = document.getElementById("caption-stage"); groups.forEach(function (group, groupIndex) { - var groupText = group.words.map(function (w) { return w.text.toUpperCase(); }).join(" "); - var computedSize = fitFontSize(groupText, CAPTION_FONT_SIZE, "900", "Gabarito", SAFE_ZONE_WIDTH); + var groupText = group.words + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); + var computedSize = fitFontSize( + groupText, + CAPTION_FONT_SIZE, + "900", + "Gabarito", + SAFE_ZONE_WIDTH, + ); var groupEl = document.createElement("div"); groupEl.id = "caption-group-" + groupIndex; groupEl.className = "caption-group"; diff --git a/registry/components/caption-glitch-rgb/caption-glitch-rgb.html b/registry/components/caption-glitch-rgb/caption-glitch-rgb.html index 8fc43fcbe..f2cd9fe00 100644 --- a/registry/components/caption-glitch-rgb/caption-glitch-rgb.html +++ b/registry/components/caption-glitch-rgb/caption-glitch-rgb.html @@ -208,7 +208,11 @@ grp.className = "gl-group"; grp.id = "gl-grp-" + gi; - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var computedSize = fitFontSize(groupText, BASE_FONT, "700", "Space Grotesk", 1720); groupWords.forEach(function (w, i) { diff --git a/registry/components/caption-glitch-rgb/demo.html b/registry/components/caption-glitch-rgb/demo.html index 8fc43fcbe..f2cd9fe00 100644 --- a/registry/components/caption-glitch-rgb/demo.html +++ b/registry/components/caption-glitch-rgb/demo.html @@ -208,7 +208,11 @@ grp.className = "gl-group"; grp.id = "gl-grp-" + gi; - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var computedSize = fitFontSize(groupText, BASE_FONT, "700", "Space Grotesk", 1720); groupWords.forEach(function (w, i) { diff --git a/registry/components/caption-gradient-fill/caption-gradient-fill.html b/registry/components/caption-gradient-fill/caption-gradient-fill.html index 39be4d405..8c26a02be 100644 --- a/registry/components/caption-gradient-fill/caption-gradient-fill.html +++ b/registry/components/caption-gradient-fill/caption-gradient-fill.html @@ -188,7 +188,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text; }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text; + }) + .join(" "); var fontSize = fitFontSize(groupText, 100, "900", "'Nunito', sans-serif", 1760); var grp = document.createElement("div"); grp.className = "gr-group"; diff --git a/registry/components/caption-gradient-fill/demo.html b/registry/components/caption-gradient-fill/demo.html index 39be4d405..8c26a02be 100644 --- a/registry/components/caption-gradient-fill/demo.html +++ b/registry/components/caption-gradient-fill/demo.html @@ -188,7 +188,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text; }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text; + }) + .join(" "); var fontSize = fitFontSize(groupText, 100, "900", "'Nunito', sans-serif", 1760); var grp = document.createElement("div"); grp.className = "gr-group"; diff --git a/registry/components/caption-kinetic-slam/caption-kinetic-slam.html b/registry/components/caption-kinetic-slam/caption-kinetic-slam.html index 47b3fa365..5d94eb99c 100644 --- a/registry/components/caption-kinetic-slam/caption-kinetic-slam.html +++ b/registry/components/caption-kinetic-slam/caption-kinetic-slam.html @@ -158,7 +158,8 @@ el.className = "kt-word"; el.id = "kt-w-" + wi; el.textContent = w.text.toUpperCase(); - el.style.fontSize = fitFontSize(w.text.toUpperCase(), 220, "400", "'Anton', sans-serif", 1720) + "px"; + el.style.fontSize = + fitFontSize(w.text.toUpperCase(), 220, "400", "'Anton', sans-serif", 1720) + "px"; if (KEYWORDS.has(wi)) el.style.color = "#FFD700"; container.appendChild(el); diff --git a/registry/components/caption-kinetic-slam/demo.html b/registry/components/caption-kinetic-slam/demo.html index 47b3fa365..5d94eb99c 100644 --- a/registry/components/caption-kinetic-slam/demo.html +++ b/registry/components/caption-kinetic-slam/demo.html @@ -158,7 +158,8 @@ el.className = "kt-word"; el.id = "kt-w-" + wi; el.textContent = w.text.toUpperCase(); - el.style.fontSize = fitFontSize(w.text.toUpperCase(), 220, "400", "'Anton', sans-serif", 1720) + "px"; + el.style.fontSize = + fitFontSize(w.text.toUpperCase(), 220, "400", "'Anton', sans-serif", 1720) + "px"; if (KEYWORDS.has(wi)) el.style.color = "#FFD700"; container.appendChild(el); diff --git a/registry/components/caption-matrix-decode/caption-matrix-decode.html b/registry/components/caption-matrix-decode/caption-matrix-decode.html index cf6145d15..bacdcf043 100644 --- a/registry/components/caption-matrix-decode/caption-matrix-decode.html +++ b/registry/components/caption-matrix-decode/caption-matrix-decode.html @@ -198,7 +198,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text; }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text; + }) + .join(" "); var fontSize = fitFontSize(groupText, 96, "700", "'Space Grotesk', sans-serif", 1760); var grp = document.createElement("div"); grp.className = "sc-group"; diff --git a/registry/components/caption-matrix-decode/demo.html b/registry/components/caption-matrix-decode/demo.html index cf6145d15..bacdcf043 100644 --- a/registry/components/caption-matrix-decode/demo.html +++ b/registry/components/caption-matrix-decode/demo.html @@ -198,7 +198,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text; }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text; + }) + .join(" "); var fontSize = fitFontSize(groupText, 96, "700", "'Space Grotesk', sans-serif", 1760); var grp = document.createElement("div"); grp.className = "sc-group"; diff --git a/registry/components/caption-neon-accent/caption-neon-accent.html b/registry/components/caption-neon-accent/caption-neon-accent.html index 833d92f57..7d769195e 100644 --- a/registry/components/caption-neon-accent/caption-neon-accent.html +++ b/registry/components/caption-neon-accent/caption-neon-accent.html @@ -391,7 +391,11 @@ function makeGroup(words, groupIndex) { var colors = assignWordColors(words, groupIndex); - var groupText = words.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = words + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var fontSize = fitFontSize(groupText, BASE_FONT_SIZE, "800", "Montserrat", SAFE_ZONE_WIDTH); while (fontSize > MIN_FONT_SIZE && !splitLinesForGroup(words, colors, fontSize)) { fontSize -= 2; diff --git a/registry/components/caption-neon-accent/demo.html b/registry/components/caption-neon-accent/demo.html index 833d92f57..7d769195e 100644 --- a/registry/components/caption-neon-accent/demo.html +++ b/registry/components/caption-neon-accent/demo.html @@ -391,7 +391,11 @@ function makeGroup(words, groupIndex) { var colors = assignWordColors(words, groupIndex); - var groupText = words.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = words + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var fontSize = fitFontSize(groupText, BASE_FONT_SIZE, "800", "Montserrat", SAFE_ZONE_WIDTH); while (fontSize > MIN_FONT_SIZE && !splitLinesForGroup(words, colors, fontSize)) { fontSize -= 2; diff --git a/registry/components/caption-neon-glow/caption-neon-glow.html b/registry/components/caption-neon-glow/caption-neon-glow.html index 947972c0e..9a4520711 100644 --- a/registry/components/caption-neon-glow/caption-neon-glow.html +++ b/registry/components/caption-neon-glow/caption-neon-glow.html @@ -171,7 +171,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var fontSize = fitFontSize(groupText, 96, "900", "'Outfit', sans-serif", 1760); var grp = document.createElement("div"); grp.className = "ne-group"; diff --git a/registry/components/caption-neon-glow/demo.html b/registry/components/caption-neon-glow/demo.html index 947972c0e..9a4520711 100644 --- a/registry/components/caption-neon-glow/demo.html +++ b/registry/components/caption-neon-glow/demo.html @@ -171,7 +171,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var fontSize = fitFontSize(groupText, 96, "900", "'Outfit', sans-serif", 1760); var grp = document.createElement("div"); grp.className = "ne-group"; diff --git a/registry/components/caption-parallax-layers/caption-parallax-layers.html b/registry/components/caption-parallax-layers/caption-parallax-layers.html index 7480aa963..8c9c17578 100644 --- a/registry/components/caption-parallax-layers/caption-parallax-layers.html +++ b/registry/components/caption-parallax-layers/caption-parallax-layers.html @@ -247,7 +247,11 @@ bEl.className = "caption-block"; bEl.id = "bb" + bi; if (block.behind) { - var behindText = block.behind.map(function (wi_arr) { return W[wi_arr[0]].text; }).join(" "); + var behindText = block.behind + .map(function (wi_arr) { + return W[wi_arr[0]].text; + }) + .join(" "); var behindSize = fitFontSize(behindText, 220, "400", "Instrument Serif", BEHIND_WIDTH); var bLine = document.createElement("div"); bLine.className = "caption-line caption-line--behind"; @@ -267,7 +271,11 @@ fEl.className = "caption-block"; fEl.id = "fb" + bi; if (block.front) { - var frontText = block.front.map(function (wi_arr) { return W[wi_arr[0]].text; }).join(" "); + var frontText = block.front + .map(function (wi_arr) { + return W[wi_arr[0]].text; + }) + .join(" "); var frontSize = fitFontSize(frontText, 130, "400", "Instrument Serif", FRONT_WIDTH); var fLine = document.createElement("div"); fLine.className = "caption-line"; diff --git a/registry/components/caption-parallax-layers/demo.html b/registry/components/caption-parallax-layers/demo.html index 7480aa963..8c9c17578 100644 --- a/registry/components/caption-parallax-layers/demo.html +++ b/registry/components/caption-parallax-layers/demo.html @@ -247,7 +247,11 @@ bEl.className = "caption-block"; bEl.id = "bb" + bi; if (block.behind) { - var behindText = block.behind.map(function (wi_arr) { return W[wi_arr[0]].text; }).join(" "); + var behindText = block.behind + .map(function (wi_arr) { + return W[wi_arr[0]].text; + }) + .join(" "); var behindSize = fitFontSize(behindText, 220, "400", "Instrument Serif", BEHIND_WIDTH); var bLine = document.createElement("div"); bLine.className = "caption-line caption-line--behind"; @@ -267,7 +271,11 @@ fEl.className = "caption-block"; fEl.id = "fb" + bi; if (block.front) { - var frontText = block.front.map(function (wi_arr) { return W[wi_arr[0]].text; }).join(" "); + var frontText = block.front + .map(function (wi_arr) { + return W[wi_arr[0]].text; + }) + .join(" "); var frontSize = fitFontSize(frontText, 130, "400", "Instrument Serif", FRONT_WIDTH); var fLine = document.createElement("div"); fLine.className = "caption-line"; diff --git a/registry/components/caption-particle-burst/caption-particle-burst.html b/registry/components/caption-particle-burst/caption-particle-burst.html index ac407eeab..6c6086766 100644 --- a/registry/components/caption-particle-burst/caption-particle-burst.html +++ b/registry/components/caption-particle-burst/caption-particle-burst.html @@ -211,7 +211,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var fontSize = fitFontSize(groupText, 88, "900", "'Outfit', sans-serif", 1720); var grp = document.createElement("div"); grp.className = "bs-group"; diff --git a/registry/components/caption-particle-burst/demo.html b/registry/components/caption-particle-burst/demo.html index ac407eeab..6c6086766 100644 --- a/registry/components/caption-particle-burst/demo.html +++ b/registry/components/caption-particle-burst/demo.html @@ -211,7 +211,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text.toUpperCase(); }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text.toUpperCase(); + }) + .join(" "); var fontSize = fitFontSize(groupText, 88, "900", "'Outfit', sans-serif", 1720); var grp = document.createElement("div"); grp.className = "bs-group"; diff --git a/registry/components/caption-typewriter/caption-typewriter.html b/registry/components/caption-typewriter/caption-typewriter.html index 6cff7fe52..44dfa86bc 100644 --- a/registry/components/caption-typewriter/caption-typewriter.html +++ b/registry/components/caption-typewriter/caption-typewriter.html @@ -180,7 +180,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text; }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text; + }) + .join(" "); var fontSize = fitFontSize(groupText, 76, "700", "'JetBrains Mono', monospace", 1760); var grp = document.createElement("div"); grp.className = "tw-group"; diff --git a/registry/components/caption-typewriter/demo.html b/registry/components/caption-typewriter/demo.html index 6cff7fe52..44dfa86bc 100644 --- a/registry/components/caption-typewriter/demo.html +++ b/registry/components/caption-typewriter/demo.html @@ -180,7 +180,11 @@ GROUPS.forEach(function (g, gi) { var groupWords = WORDS.slice(g.wordStart, g.wordEnd + 1); - var groupText = groupWords.map(function (w) { return w.text; }).join(" "); + var groupText = groupWords + .map(function (w) { + return w.text; + }) + .join(" "); var fontSize = fitFontSize(groupText, 76, "700", "'JetBrains Mono', monospace", 1760); var grp = document.createElement("div"); grp.className = "tw-group"; diff --git a/registry/components/caption-weight-shift/caption-weight-shift.html b/registry/components/caption-weight-shift/caption-weight-shift.html index 3d2d74391..ffb1508a5 100644 --- a/registry/components/caption-weight-shift/caption-weight-shift.html +++ b/registry/components/caption-weight-shift/caption-weight-shift.html @@ -288,8 +288,18 @@ function buildCaptions(groups) { var stage = document.getElementById("caption-stage"); groups.forEach(function (group, groupIndex) { - var groupText = group.words.map(function (w) { return w.text.toLowerCase(); }).join(" "); - var computedSize = fitFontSize(groupText, CAPTION_FONT_SIZE, "700", "Montserrat", MAX_LINE_WIDTH); + var groupText = group.words + .map(function (w) { + return w.text.toLowerCase(); + }) + .join(" "); + var computedSize = fitFontSize( + groupText, + CAPTION_FONT_SIZE, + "700", + "Montserrat", + MAX_LINE_WIDTH, + ); var groupEl = document.createElement("div"); var copyEl = document.createElement("div"); groupEl.id = "caption-group-" + groupIndex; diff --git a/registry/components/caption-weight-shift/demo.html b/registry/components/caption-weight-shift/demo.html index 3d2d74391..ffb1508a5 100644 --- a/registry/components/caption-weight-shift/demo.html +++ b/registry/components/caption-weight-shift/demo.html @@ -288,8 +288,18 @@ function buildCaptions(groups) { var stage = document.getElementById("caption-stage"); groups.forEach(function (group, groupIndex) { - var groupText = group.words.map(function (w) { return w.text.toLowerCase(); }).join(" "); - var computedSize = fitFontSize(groupText, CAPTION_FONT_SIZE, "700", "Montserrat", MAX_LINE_WIDTH); + var groupText = group.words + .map(function (w) { + return w.text.toLowerCase(); + }) + .join(" "); + var computedSize = fitFontSize( + groupText, + CAPTION_FONT_SIZE, + "700", + "Montserrat", + MAX_LINE_WIDTH, + ); var groupEl = document.createElement("div"); var copyEl = document.createElement("div"); groupEl.id = "caption-group-" + groupIndex;