Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
NEW: Issue #883: embed-responsive bootstrap class not supported?
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Nov 25, 2018
1 parent 8af218d commit 06b5a42
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ New in 3.5.1.2
- FIX: Position of quiz correction icons.
- FIX: Issue #876: Context menu in header near top right empty and showing for non-logged in users and students.
- FIX: Issue #882: badgesmi setting missing in settings.php.
- FIX: Issue #884: Removed important font size declarations from responsive.less. Thanks to Mike Nodding for the patch.
- NEW: H5P Custom CSS setting in 'Features' for the H5P module (https://moodle.org/plugins/mod_hvp) if installed.
- NEW: Issue #883: embed-responsive bootstrap class not supported?
- NEW: Issue #884: Removed important font size declarations from responsive.less. Thanks to Mike Nodding for the patch.

New in 3.5.1.1
==============
Expand Down
53 changes: 53 additions & 0 deletions less/bootstrap-override/bs4_embed.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Credit: Nicolas Gallagher and SUIT CSS.
// From _embed.scss in BS 4.

.embed-responsive {
position: relative;
display: block;
width: 100%;
padding: 0;
overflow: hidden;

&::before {
display: block;
content: "";
}

.embed-responsive-item,
iframe,
embed,
object,
video {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
}

.embed-responsive-21by9 {
&::before {
padding-top: percentage(9 / 21);
}
}

.embed-responsive-16by9 {
&::before {
padding-top: percentage(9 / 16);
}
}

.embed-responsive-4by3 {
&::before {
padding-top: percentage(3 / 4);
}
}

.embed-responsive-1by1 {
&::before {
padding-top: percentage(1 / 1);
}
}
1 change: 1 addition & 0 deletions less/essential.less
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ body {
// Moodle less end.

@import "bootstrap-override/variables";
@import "bootstrap-override/bs4_embed";
@import "bootstrap-override/carousel";
@import "bootstrap-override/type";

Expand Down
36 changes: 36 additions & 0 deletions style/essential.css
Original file line number Diff line number Diff line change
Expand Up @@ -19801,6 +19801,42 @@ ul.indented-list {
.w-25 {
width: 25%;
}
.embed-responsive {
position: relative;
display: block;
width: 100%;
padding: 0;
overflow: hidden;
}
.embed-responsive::before {
display: block;
content: "";
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
.embed-responsive-21by9::before {
padding-top: 42.85714286%;
}
.embed-responsive-16by9::before {
padding-top: 56.25%;
}
.embed-responsive-4by3::before {
padding-top: 75%;
}
.embed-responsive-1by1::before {
padding-top: 100%;
}
.carousel-indicators {
z-index: 2;
}
Expand Down

0 comments on commit 06b5a42

Please sign in to comment.