diff --git a/theme/boost/scss/moodle.scss b/theme/boost/scss/moodle.scss index ba84d8e71ff..a92eaa3eedb 100644 --- a/theme/boost/scss/moodle.scss +++ b/theme/boost/scss/moodle.scss @@ -39,3 +39,4 @@ $breadcrumb-divider-rtl: "◀" !default; @import "moodle/sticky-footer"; @import "moodle/popover-region"; @import "moodle/tool_usertours"; +@import "moodle/bs2-compat"; diff --git a/theme/boost/scss/moodle/bs2-compat.scss b/theme/boost/scss/moodle/bs2-compat.scss new file mode 100644 index 00000000000..fa62ea83f00 --- /dev/null +++ b/theme/boost/scss/moodle/bs2-compat.scss @@ -0,0 +1,74 @@ +// Some - backwards compatibility for BS2. We may have plugins and user content targeted for BS2. + +// Well -> Panel -> Card. We skipped panel (BS3) so lets just support well and card. +.well { + @extend .card; + @extend .card-block; +} + +// Some things just got renamed. +.img-responsive { + @extend .img-fluid; +} + +.text-error { + @extend .text-danger; +} + +.btn-default { + @extend .btn-secondary; +} + +// Labels and badges. + +.label { + @extend .tag; + @include tag-variant($tag-default-bg); +} + +.label-success { + @include tag-variant($tag-success-bg); +} + +.label-info { + @include tag-variant($tag-info-bg); +} + +.label-warning { + @include tag-variant($tag-warning-bg); +} + +.label-important { + @include tag-variant($tag-danger-bg); +} + +.badge { + @extend .tag; + @include tag-variant($tag-default-bg); + @include border-radius($font-size-root / 2); +} + +.badge-success { + @include tag-variant($tag-success-bg); +} + +.badge-info { + @include tag-variant($tag-info-bg); +} + +.badge-warning { + @include tag-variant($tag-warning-bg); +} + +.badge-important { + @include tag-variant($tag-danger-bg); +} + +// Floats. +.pull-left { + @include pull-left(); +} + +.pull-right { + @include pull-right(); +}