MDL-69117 theme_boost: deprecate the autoprefixer
authorBas Brands <bas@moodle.com>
Wed, 2 Sep 2020 08:48:20 +0000 (10:48 +0200)
committerBas Brands <bas@moodle.com>
Wed, 2 Sep 2020 10:14:11 +0000 (12:14 +0200)
theme/boost/classes/autoprefixer.php
theme/boost/config.php
theme/boost/lib.php
theme/boost/scss/moodle.scss
theme/boost/scss/moodle/prefixes.scss [new file with mode: 0644]
theme/boost/style/moodle.css
theme/classic/style/moodle.css

index 59f1989..9353d2a 100644 (file)
@@ -104,6 +104,8 @@ class autoprefixer {
      * @param Document $tree The CSS tree.
      */
     public function __construct(Document $tree) {
+        debugging('theme_boost\autoprefixer() is deprecated. Required prefixes for Bootstrap ' .
+            'are now in theme/boost/scss/moodle/prefixes.scss', DEBUG_DEVELOPER);
         $this->tree = $tree;
 
         $pseudos = array_map(function($pseudo) {
index a8a727c..613162f 100644 (file)
@@ -148,7 +148,6 @@ $THEME->layouts = [
 
 $THEME->parents = [];
 $THEME->enable_dock = false;
-$THEME->csstreepostprocessor = 'theme_boost_css_tree_post_processor';
 $THEME->extrascsscallback = 'theme_boost_get_extra_scss';
 $THEME->prescsscallback = 'theme_boost_get_pre_scss';
 $THEME->precompiledcsscallback = 'theme_boost_get_precompiled_css';
index 68a20f8..ac320bc 100644 (file)
@@ -31,6 +31,8 @@ defined('MOODLE_INTERNAL') || die();
  * @param theme_config $theme The theme config object.
  */
 function theme_boost_css_tree_post_processor($tree, $theme) {
+    error_log('theme_boost_css_tree_post_processor() is deprecated. Required' .
+        'prefixes for Bootstrap are now in theme/boost/scss/moodle/prefixes.scss');
     $prefixer = new theme_boost\autoprefixer($tree);
     $prefixer->prefix();
 }
index d79ac1f..d71a4fd 100644 (file)
@@ -40,3 +40,4 @@ $breadcrumb-divider-rtl: "◀" !default;
 @import "moodle/print";
 @import "moodle/modal";
 @import "moodle/layout";
+@import "moodle/prefixes";
diff --git a/theme/boost/scss/moodle/prefixes.scss b/theme/boost/scss/moodle/prefixes.scss
new file mode 100644 (file)
index 0000000..b7458bf
--- /dev/null
@@ -0,0 +1,65 @@
+.form-control:-ms-input-placeholder {
+    color: $input-placeholder-color;
+}
+
+.custom-select {
+    -webkit-appearance: none;
+    -moz-appearance: none;
+}
+
+.custom-range {
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    &::-webkit-slider-thumb,
+    &::-moz-range-thumb,
+    &::-ms-thumb {
+        -webkit-appearance: none;
+        -moz-appearance: none;
+    }
+}
+
+input[type="date"],
+input[type="time"],
+input[type="datetime-local"],
+input[type="month"] {
+    &.form-control {
+        -webkit-appearance: none;
+        -moz-appearance: none;
+    }
+}
+
+.card-columns {
+    @include media-breakpoint-up(sm) {
+        -webkit-column-gap: $card-columns-gap;
+        -moz-column-gap: $card-columns-gap;
+    }
+}
+
+.carousel-item {
+    -webkit-backface-visibility: hidden;
+}
+
+.card {
+    -webkit-background-clip: border-box;
+}
+
+.carousel-indicators li,
+.dropdown-menu,
+.form-control,
+.modal-content,
+.popover,
+.toast {
+    -webkit-background-clip: padding-box;
+}
+
+.btn {
+    -webkit-user-select: none;
+    -ms-user-select: none;
+}
+
+@each $value in $user-selects {
+    .user-select-#{$value} {
+        -webkit-user-select: $value !important; /* stylelint-disable-line declaration-no-important */
+        -ms-user-select: none;
+    }
+}
\ No newline at end of file
index eb140de..b43bbae 100644 (file)
@@ -19070,6 +19070,65 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont
       height: 1em;
       font-size: 4em; }
 
+.form-control:-ms-input-placeholder {
+  color: #6c757d; }
+
+.custom-select {
+  -webkit-appearance: none;
+  -moz-appearance: none; }
+
+.custom-range {
+  -webkit-appearance: none;
+  -moz-appearance: none; }
+  .custom-range::-webkit-slider-thumb, .custom-range::-moz-range-thumb, .custom-range::-ms-thumb {
+    -webkit-appearance: none;
+    -moz-appearance: none; }
+
+input[type="date"].form-control,
+input[type="time"].form-control,
+input[type="datetime-local"].form-control,
+input[type="month"].form-control {
+  -webkit-appearance: none;
+  -moz-appearance: none; }
+
+@media (min-width: 576px) {
+  .card-columns {
+    -webkit-column-gap: 1.25rem;
+    -moz-column-gap: 1.25rem; } }
+
+.carousel-item {
+  -webkit-backface-visibility: hidden; }
+
+.card {
+  -webkit-background-clip: border-box; }
+
+.carousel-indicators li,
+.dropdown-menu,
+.form-control,
+.modal-content,
+.popover,
+.toast {
+  -webkit-background-clip: padding-box; }
+
+.btn {
+  -webkit-user-select: none;
+  -ms-user-select: none; }
+
+.user-select-all {
+  -webkit-user-select: all !important;
+  /* stylelint-disable-line declaration-no-important */
+  -ms-user-select: none; }
+
+.user-select-auto {
+  -webkit-user-select: auto !important;
+  /* stylelint-disable-line declaration-no-important */
+  -ms-user-select: none; }
+
+.user-select-none {
+  -webkit-user-select: none !important;
+  /* stylelint-disable-line declaration-no-important */
+  -ms-user-select: none; }
+
 body {
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale; }
index 452d83c..1ff7f4a 100644 (file)
@@ -19253,6 +19253,65 @@ span[data-flexitour="container"][x-placement="right"], span[data-flexitour="cont
       height: 1em;
       font-size: 4em; }
 
+.form-control:-ms-input-placeholder {
+  color: #6c757d; }
+
+.custom-select {
+  -webkit-appearance: none;
+  -moz-appearance: none; }
+
+.custom-range {
+  -webkit-appearance: none;
+  -moz-appearance: none; }
+  .custom-range::-webkit-slider-thumb, .custom-range::-moz-range-thumb, .custom-range::-ms-thumb {
+    -webkit-appearance: none;
+    -moz-appearance: none; }
+
+input[type="date"].form-control,
+input[type="time"].form-control,
+input[type="datetime-local"].form-control,
+input[type="month"].form-control {
+  -webkit-appearance: none;
+  -moz-appearance: none; }
+
+@media (min-width: 576px) {
+  .card-columns {
+    -webkit-column-gap: 1.25rem;
+    -moz-column-gap: 1.25rem; } }
+
+.carousel-item {
+  -webkit-backface-visibility: hidden; }
+
+.card {
+  -webkit-background-clip: border-box; }
+
+.carousel-indicators li,
+.dropdown-menu,
+.form-control,
+.modal-content,
+.popover,
+.toast {
+  -webkit-background-clip: padding-box; }
+
+.btn {
+  -webkit-user-select: none;
+  -ms-user-select: none; }
+
+.user-select-all {
+  -webkit-user-select: all !important;
+  /* stylelint-disable-line declaration-no-important */
+  -ms-user-select: none; }
+
+.user-select-auto {
+  -webkit-user-select: auto !important;
+  /* stylelint-disable-line declaration-no-important */
+  -ms-user-select: none; }
+
+.user-select-none {
+  -webkit-user-select: none !important;
+  /* stylelint-disable-line declaration-no-important */
+  -ms-user-select: none; }
+
 body {
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale; }