From b687667fb60097c652bac2ce418dc26d951af804 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 7 Dec 2022 14:05:09 +0100 Subject: [PATCH] Fix table layout for matrix questions --- client/src/styles/_survey.scss | 13 +++++++++++-- client/src/styles/survey.reset.css | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/client/src/styles/_survey.scss b/client/src/styles/_survey.scss index e2b69c89..5e9f197c 100644 --- a/client/src/styles/_survey.scss +++ b/client/src/styles/_survey.scss @@ -120,15 +120,24 @@ margin-bottom: $large-spacing; &__row { - display: table-row; + display: flex; + width: 100%; + flex-direction: row; border-top: 1px solid $color-silver; + + > td { + @include small-text; + } } &__cell { - display: table-cell; + display: flex; padding: $medium-spacing 0; text-align: left; vertical-align: middle; + justify-content: center; + flex: 1; + @include small-text; span { diff --git a/client/src/styles/survey.reset.css b/client/src/styles/survey.reset.css index 8eb5dc09..1e9a8520 100644 --- a/client/src/styles/survey.reset.css +++ b/client/src/styles/survey.reset.css @@ -29,3 +29,26 @@ .sv-radio__svg { display: none !important; } + +table, tbody, thead, tr { + box-sizing: border-box; +} + +tbody, thead, tr { + display: flex; + flex-flow: row wrap; +} + +td, th { + flex: 1; +} + + + +.sv-table__cell, +.sv-table__cell:not(:first-child), +.sv-table__cell:not(:last-child) +{ + padding: 0; +} +