MDL-71366 core_question: prevent question options overflow

This commit is contained in:
Bas Brands 2021-06-03 11:08:27 +02:00
parent 265629b568
commit c11a90acab
4 changed files with 53 additions and 1 deletions

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'));
}

View File

@ -2747,3 +2747,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;
}
}

View File

@ -11914,6 +11914,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;

View File

@ -12135,6 +12135,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;