-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(embeds): add docs for responsive embeds
[finishes #80657568] Signed-off-by: Geoff Pleiss <gpleiss@pivotal.io>
- Loading branch information
Showing
2 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/*doc | ||
--- | ||
title: Embeds | ||
name: embeds | ||
categories: | ||
- All | ||
- Elements | ||
--- | ||
*/ | ||
|
||
/*doc | ||
--- | ||
title: Responsive Embeds | ||
name: embeds_responsive | ||
parent: embeds | ||
--- | ||
Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device. | ||
Rules are directly applied to `<iframe>`, `<embed>`, and `<object>` elements; optionally use an explicit descendant class .embed-responsive-item when you want to match the styling for other attributes. | ||
**Pro-Tip!** You don't need to include `frameborder="0"` in your `<iframe>`s as we override that for you. | ||
```html_example | ||
<h1 class="h2">16-by-9</h1> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
<div class="embed-responsive embed-responsive-16by9"> | ||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/JOCtdw9FG-s"></iframe> | ||
</div> | ||
</div> | ||
<div class="col-md-7"> | ||
<div class="embed-responsive embed-responsive-16by9"> | ||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/JOCtdw9FG-s"></iframe> | ||
</div> | ||
</div> | ||
<div class="col-md-12"> | ||
<div class="embed-responsive embed-responsive-16by9"> | ||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/JOCtdw9FG-s"></iframe> | ||
</div> | ||
</div> | ||
</div> | ||
``` | ||
```html_example | ||
<h1 class="h2">4-by-3</h1> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
<div class="embed-responsive embed-responsive-4by3"> | ||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/Awf45u6zrP0"></iframe> | ||
</div> | ||
</div> | ||
<div class="col-md-7"> | ||
<div class="embed-responsive embed-responsive-4by3"> | ||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/Awf45u6zrP0"></iframe> | ||
</div> | ||
</div> | ||
<div class="col-md-12"> | ||
<div class="embed-responsive embed-responsive-4by3"> | ||
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/Awf45u6zrP0"></iframe> | ||
</div> | ||
</div> | ||
</div> | ||
``` | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters