mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 09:30:17 +01:00
MDL-56004 theme: Add some BS2 compatibility to BS4.
This is for user-created texts (e.g. the people have used the generico filter to inject BS2 markup into user tests). It is also for existing old HTML that we have not had time to upgrade yet.
This commit is contained in:
parent
fe4a6c3bdb
commit
0862719092
@ -39,3 +39,4 @@ $breadcrumb-divider-rtl: "◀" !default;
|
||||
@import "moodle/sticky-footer";
|
||||
@import "moodle/popover-region";
|
||||
@import "moodle/tool_usertours";
|
||||
@import "moodle/bs2-compat";
|
||||
|
74
theme/boost/scss/moodle/bs2-compat.scss
Normal file
74
theme/boost/scss/moodle/bs2-compat.scss
Normal file
@ -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();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user