From 8b4909ab800de8e6fb49d918ad5f15ae729497ba Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 13 Jan 2023 15:58:07 +0100 Subject: [PATCH] use height limiting instead of legacy line-clamp --- app/assets/stylesheets/components/_collapse.scss | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/components/_collapse.scss b/app/assets/stylesheets/components/_collapse.scss index f141d9c8..0f8afd60 100644 --- a/app/assets/stylesheets/components/_collapse.scss +++ b/app/assets/stylesheets/components/_collapse.scss @@ -1,23 +1,22 @@ @use "sass:map"; .collapsed { - display: -webkit-box; - -webkit-box-orient: vertical; overflow: hidden; + text-overflow: ellipsis; &.answerbox__answer-text { - -webkit-line-clamp: 12; + max-height: 18rem; @include media-breakpoint-up('sm') { - -webkit-line-clamp: 7; + max-height: 10.5rem; } } &.answerbox__question-text { - -webkit-line-clamp: 10; + max-height: 15rem; @include media-breakpoint-up('sm') { - -webkit-line-clamp: 5; + max-height: 7.5rem; } } }