From 79a1ea232a8bdf5efc7cdecede076ca51a39997e Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Wed, 4 Oct 2023 09:02:31 +0200 Subject: [PATCH 1/2] switch to grid layout for multiple choice buttons to allow multi-line texts in translations --- umap/static/umap/base.css | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index 5bc48647..22f35cce 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -342,19 +342,24 @@ input.switch:checked ~ label:before { input.switch:checked ~ label:after { margin-left: 3em; } -.button-bar { +.button-bar, .umap-multiplechoice { margin-top: 5px; text-align: center; display: grid; - grid-gap: 7px; width: 100% } +.button-bar { + grid-gap: 7px; +} .button-bar.half { grid-template-columns: 1fr 1fr; } -.button-bar.third { +.button-bar.third, .umap-multiplechoice.by3 { grid-template-columns: 1fr 1fr 1fr; } +.umap-multiplechoice.by4 { + grid-template-columns: 1fr 1fr 1fr 1fr; +} .button-bar .button { display: inline-block; } @@ -365,15 +370,12 @@ input.switch:checked ~ label:after { border: 1px solid #374E75; cursor: pointer; background-color: #c9c9c7; - height: 30px; + min-height: 30px; line-height: 30px; text-align: center; - width: calc(100% / 3); + width: 100%; display: inline-block; } -.umap-multiplechoice.by4 label { - width: calc(100% / 4); -} .dark .umap-multiplechoice label { border: 1px solid black; background-color: #2c3233; From 34122b154948ed3cf1d6605d5fa3f51d1b680aa0 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 4 Oct 2023 09:36:55 +0200 Subject: [PATCH 2/2] Remove unused CSS class .third Co-authored-by: Joachim Schleicher --- umap/static/umap/base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index 22f35cce..b5f1ce9a 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -354,7 +354,7 @@ input.switch:checked ~ label:after { .button-bar.half { grid-template-columns: 1fr 1fr; } -.button-bar.third, .umap-multiplechoice.by3 { +.umap-multiplechoice.by3 { grid-template-columns: 1fr 1fr 1fr; } .umap-multiplechoice.by4 {