MDL-71366 core_question: prevent question options overflow

This commit is contained in:
Bas Brands
2021-07-01 11:56:59 +08:00
committed by Adrian Greeve
parent 2e7109d7ae
commit b2e353c169
4 changed files with 53 additions and 1 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ abstract class qtype_multichoice_renderer_base extends qtype_with_combined_feedb
$result .= html_writer::tag('div', $question->format_questiontext($qa),
array('class' => 'qtext'));
$result .= html_writer::start_tag('div', array('class' => 'ablock'));
$result .= html_writer::start_tag('div', array('class' => 'ablock no-overflow visual-scroll-x'));
if ($question->showstandardinstruction == 1) {
$result .= html_writer::tag('div', $this->prompt(), array('class' => 'prompt'));
}
+22
View File
@@ -2743,3 +2743,25 @@ $picker-emojis-per-row: 7 !default;
.core_payment_gateways_modal .custom-control-label::after {
top: 45%;
}
$scrollbar-thumb: $primary;
$scrollbar-track: lighten($primary, 40%);
// simple scrollbars
.visual-scroll-x {
scrollbar-width: thin;
scrollbar-color: $scrollbar-thumb $scrollbar-track;
-ms-overflow-style: -ms-autohiding-scrollbar;
&::-webkit-scrollbar {
height: 8px; // for horizontal scrollbars
-webkit-appearance: none;
appearance: none;
}
&::-webkit-scrollbar-thumb {
background-color: $scrollbar-thumb;
border-right: $border-width solid $white;
}
&::-webkit-scrollbar-track {
background-color: $scrollbar-track;
border-right: $border-width solid $white;
}
}
+15
View File
@@ -11893,6 +11893,21 @@ input[disabled] {
.core_payment_gateways_modal .custom-control-label::after {
top: 45%; }
.visual-scroll-x {
scrollbar-width: thin;
scrollbar-color: #0f6fc5 #a8d2f8;
-ms-overflow-style: -ms-autohiding-scrollbar; }
.visual-scroll-x::-webkit-scrollbar {
height: 8px;
-webkit-appearance: none;
appearance: none; }
.visual-scroll-x::-webkit-scrollbar-thumb {
background-color: #0f6fc5;
border-right: 1px solid #fff; }
.visual-scroll-x::-webkit-scrollbar-track {
background-color: #a8d2f8;
border-right: 1px solid #fff; }
.icon {
font-size: 16px;
width: 16px;
+15
View File
@@ -12106,6 +12106,21 @@ input[disabled] {
.core_payment_gateways_modal .custom-control-label::after {
top: 45%; }
.visual-scroll-x {
scrollbar-width: thin;
scrollbar-color: #0f6fc5 #a8d2f8;
-ms-overflow-style: -ms-autohiding-scrollbar; }
.visual-scroll-x::-webkit-scrollbar {
height: 8px;
-webkit-appearance: none;
appearance: none; }
.visual-scroll-x::-webkit-scrollbar-thumb {
background-color: #0f6fc5;
border-right: 1px solid #fff; }
.visual-scroll-x::-webkit-scrollbar-track {
background-color: #a8d2f8;
border-right: 1px solid #fff; }
.icon {
font-size: 16px;
width: 16px;