From e6fb8c8c12e0d3f3d7b71cf1ee86d077f9d06483 Mon Sep 17 00:00:00 2001 From: Andrew Nowak <10963046+andrew-nowak@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:26:36 +0100 Subject: [PATCH] resize the crossword grid by dimensions, not the type (#27336) * resize the crossword grid by dimensions, not the type * Cap max grid size, scale font with size not cell count * Remove grid-size CSS class from accessible template There is no grid on the accessible version of a crossword page, so these styles are irrelevant --- .../crosswords/accessibleCrosswordContent.scala.html | 2 +- .../fragments/crosswords/crosswordContent.scala.html | 2 +- .../projects/common/modules/crosswords/crossword.js | 2 +- static/src/stylesheets/module/crosswords/_cell.scss | 10 ---------- .../src/stylesheets/module/crosswords/_layout.scss | 7 ++++--- static/src/stylesheets/module/crosswords/_vars.scss | 12 +----------- 6 files changed, 8 insertions(+), 27 deletions(-) diff --git a/applications/app/views/fragments/crosswords/accessibleCrosswordContent.scala.html b/applications/app/views/fragments/crosswords/accessibleCrosswordContent.scala.html index c3fd85cea44..5e14e02d630 100644 --- a/applications/app/views/fragments/crosswords/accessibleCrosswordContent.scala.html +++ b/applications/app/views/fragments/crosswords/accessibleCrosswordContent.scala.html @@ -9,7 +9,7 @@
-
+

Blanks

diff --git a/applications/app/views/fragments/crosswords/crosswordContent.scala.html b/applications/app/views/fragments/crosswords/crosswordContent.scala.html index 55de2576c92..2eee10bf217 100644 --- a/applications/app/views/fragments/crosswords/crosswordContent.scala.html +++ b/applications/app/views/fragments/crosswords/crosswordContent.scala.html @@ -17,7 +17,7 @@ data-crossword-data="@Json.stringify(Json.toJson(crosswordPage.crossword))">
+ class="crossword__container crossword__container--@{crosswordPage.crossword.dimensions.cols}cell"> @* The following is a fallback for when JavaScript is not enabled *@
diff --git a/static/src/javascripts/projects/common/modules/crosswords/crossword.js b/static/src/javascripts/projects/common/modules/crosswords/crossword.js index 181708aa65b..4803001e192 100644 --- a/static/src/javascripts/projects/common/modules/crosswords/crossword.js +++ b/static/src/javascripts/projects/common/modules/crosswords/crossword.js @@ -749,7 +749,7 @@ class Crossword extends Component { return (