From eb225bae4b9b51f037e0e889424f21aaf2d7a4ff Mon Sep 17 00:00:00 2001 From: Timothy Kim Date: Fri, 10 Jul 2026 15:15:54 -0400 Subject: [PATCH] align factoring problems on the equal sign --- static/factoring.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/static/factoring.html b/static/factoring.html index 2d41d7f..a01fcf0 100644 --- a/static/factoring.html +++ b/static/factoring.html @@ -93,21 +93,22 @@ } .problem { - display: flex; + display: grid; + grid-template-columns: 26px 1fr auto auto; align-items: baseline; - gap: 6px; + column-gap: 6px; font-size: 1.2rem; font-weight: 700; padding: 7px 4px; border-bottom: 1px solid #e0e0e0; } .prob-num { - min-width: 26px; font-size: 0.78rem; font-weight: 800; color: #999; - flex-shrink: 0; } + .lhs { text-align: right; } + .rhs { text-align: left; } .answer-line { border-bottom: 2px solid #111; min-width: 34px; @@ -222,23 +223,24 @@ function renderProblems() { // Part I - Factor: given a + b, write the factored form const partA = genUnique(PER_PART).map((t, i) => `
${i+1}.` + - `${t.a} + ${t.b} = ` + - `( + )` + - `
` + `${t.a} + ${t.b}=` + + `( + )` + + `` ).join(''); // Part II - Expand: given x(y + z), write the sum const partB = genUnique(PER_PART).map((t, i) => `
${i+1}.` + - `${t.x}(${t.y} + ${t.z}) = ` + - ` + ` + - `
` + `${t.x}(${t.y} + ${t.z})=` + + ` + ` + + `` ).join(''); // Part III - Find the common factor: fill the box const partC = genUnique(PER_PART).map((t, i) => `
${i+1}.` + - `${t.a} + ${t.b} = (${t.y} + ${t.z})
` + `${t.a} + ${t.b}=` + + `(${t.y} + ${t.z})` ).join(''); return `