Merge branch 'MDL-71366-master' of git://github.com/bmbrands/moodle
authorAdrian Greeve <abgreeve@gmail.com>
Thu, 1 Jul 2021 04:01:12 +0000 (12:01 +0800)
committerIlya Tregubov <ilya@moodle.com>
Thu, 1 Jul 2021 08:08:04 +0000 (10:08 +0200)
question/type/calculatedmulti/styles.css
question/type/multichoice/renderer.php
question/type/multichoice/styles.css
theme/boost/scss/moodle/core.scss
theme/boost/style/moodle.css
theme/classic/style/moodle.css

index 297af38..cf0413c 100644 (file)
@@ -25,4 +25,5 @@
 .que.calculatedmulti .answer div.r1 input {
     margin: 0.3rem 0.5rem;
     width: 14px;
+    flex-shrink: 0;
 }
index e9cec51..3c22b3d 100644 (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'));
         }
index bf2e736..ae16420 100644 (file)
@@ -9,6 +9,7 @@
 .que.multichoice .answer div.r1 input {
     margin: 0.3rem 0.5rem;
     width: 14px;
+    flex-shrink: 0;
 }
 
 .que.multichoice .answer .answernumber {
index 41921a7..685b870 100644 (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;
+    }
+}
index d269722..8e84a3b 100644 (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;
index c3ea87f..73ef6a2 100644 (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;