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 f2bc809 commit 0324434
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ New in 3.4.1.4
- FIX: Issue #882: badgesmi setting missing in settings.php.
- NEW: H5P Custom CSS setting in 'Features' for the H5P module (https://moodle.org/plugins/mod_hvp) if installed.
- NEW: Issue #867: Skip links for footer blocks sometimes appear over main course page content.
- 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.4.1.3
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 @@ -19746,6 +19746,42 @@ ul.indented-list {
.bg-faded {
background-color: #eee;
}
.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 0324434

Please sign in to comment.