Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
331b8d22
Commit
331b8d22
authored
Jun 18, 2015
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 21x9 responsive embed modifier
- Credit: @adammacias - Fixes #16499
parent
b39ce7d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
docs/components/utilities.md
docs/components/utilities.md
+6
-1
scss/_responsive-embed.scss
scss/_responsive-embed.scss
+5
-0
No files found.
docs/components/utilities.md
View file @
331b8d22
...
@@ -296,9 +296,14 @@ Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` e
...
@@ -296,9 +296,14 @@ Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` e
</div>
</div>
{% endexample %}
{% endexample %}
Aspect ratios can be customized
. There are two available in Bootstrap, 16x9 and 4x3 (two of the most common for video)
.
Aspect ratios can be customized
with modifier classes
.
{% highlight html %}
{% highlight html %}
<!-- 21:9 aspect ratio -->
<div
class=
"embed-responsive embed-responsive-21by9"
>
<iframe
class=
"embed-responsive-item"
src=
"..."
></iframe>
</div>
<!-- 16:9 aspect ratio -->
<!-- 16:9 aspect ratio -->
<div
class=
"embed-responsive embed-responsive-16by9"
>
<div
class=
"embed-responsive embed-responsive-16by9"
>
<iframe
class=
"embed-responsive-item"
src=
"..."
></iframe>
<iframe
class=
"embed-responsive-item"
src=
"..."
></iframe>
...
...
scss/_responsive-embed.scss
View file @
331b8d22
...
@@ -26,6 +26,11 @@
...
@@ -26,6 +26,11 @@
}
}
}
}
// Modifier class for 21:9 aspect ratio
.embed-responsive-21by9
{
padding-bottom
:
42
.85%
;
}
// Modifier class for 16:9 aspect ratio
// Modifier class for 16:9 aspect ratio
.embed-responsive-16by9
{
.embed-responsive-16by9
{
padding-bottom
:
56
.25%
;
padding-bottom
:
56
.25%
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment