Skip to content

Commit

Permalink
Moving the embed to it's own CSS file, moving the docs to the Compone…
Browse files Browse the repository at this point in the history
…nts page with an example, fixing a Glyhpicons list problem in the docs
  • Loading branch information
mdo committed Mar 7, 2014
1 parent 12c619f commit 705ff7f
Show file tree
Hide file tree
Showing 18 changed files with 127 additions and 114 deletions.
57 changes: 29 additions & 28 deletions dist/css/bootstrap-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap-rtl.min.css

Large diffs are not rendered by default.

49 changes: 25 additions & 24 deletions dist/css/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/_includes/nav-components.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@
<li><a href="#panels-list-group">With list groups</a>
</ul>
</li>
<li><a href="#responsive-embed">Responsive embed</a></li>
<li><a href="#wells">Wells</a></li>
1 change: 0 additions & 1 deletion docs/_includes/nav-css.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
<li><a href="#helper-classes-show-hide">Showing and hiding content</a></li>
<li><a href="#helper-classes-screen-readers">Screen reader content</a></li>
<li><a href="#helper-classes-image-replacement">Image replacement</a></li>
<li><a href="#helper-classes-embeds-responsive">Embeds responsive</a></li>
</ul>
</li>
<li>
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/css/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ h1[id] {
*/

.bs-glyphicons {
margin: 0 -19px 20px -16px;
margin: 0 -10px 20px;
overflow: hidden;
}
.bs-glyphicons-list {
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/css/docs.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/js/customize.min.js

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions docs/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -3025,6 +3025,34 @@ <h3 id="panels-list-group">With list groups</h3>



<!-- Responsive embeds
================================================== -->
<div class="bs-docs-section">
<h1 id="responsive-embed" class="page-header">Responsive embed</h1>

<p>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.</p>
<p>Rules are directly apply to <code>&lt;iframe&gt;</code>, <code>&lt;embed&gt;</code> and <code>&lt;object&gt;</code> elements, optionally use of an explicit descendant class <code>.embed-responsive-item</code> when you want to match the styling for other attributes.</p>
<p><strong>Pro-Tip!</strong> You don't need to include <code>frameborder="0"</code> in your <code>&lt;iframe&gt;</code>s as we override that for you.</p>
<div class="bs-example">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
</div>
</div>
{% highlight html %}
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src=""></iframe>
</div>

<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src=""></iframe>
</div>
{% endhighlight %}
</div>



<!-- Wells
================================================== -->
<div class="bs-docs-section">
Expand Down
16 changes: 0 additions & 16 deletions docs/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -2570,22 +2570,6 @@ <h1 class="text-hide">Custom heading</h1>
.heading {
.text-hide();
}
{% endhighlight %}


<h3 id="helper-classes-embeds-responsive">Embeds responsive</h3>
<p>Allows browsers to determine videos or slideshow dimensions based on the width of their containing block to create an intrinsic ratio that will properly scale on any device.</p>
<p>Rules are directly apply to <code>&lt;iframe&gt;</code>, <code>&lt;embed&gt;</code> and <code>&lt;object&gt;</code> elements, optionally use of an explicit descendant class <code>.embed-responsive-item</code> when you want to match the styling for other attributes.</p>
{% highlight html %}
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src=""></iframe>
</div>

<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src=""></iframe>
</div>
{% endhighlight %}
</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap-rtl.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions less/bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";

Expand Down
34 changes: 34 additions & 0 deletions less/responsive-embed.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Embeds responsive
//
// Credit: Nicolas Gallagher and SUIT CSS.

.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;

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

// Modifier class for 16:9 aspect ratio
&.embed-responsive-16by9 {
padding-bottom: 56.25%;
}

// Modifier class for 4:3 aspect ratio
&.embed-responsive-4by3 {
padding-bottom: 75%;
}
}
36 changes: 0 additions & 36 deletions less/utilities.less
Original file line number Diff line number Diff line change
Expand Up @@ -54,39 +54,3 @@
.affix {
position: fixed;
}


// Embeds responsive
// -------------------------

// Credit: Nicolas Gallagher

.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;

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

// Modifier class for 16:9 aspect ratio
&.embed-responsive-16by9 {
padding-bottom: 56.25%;
}

// Modifier class for 4:3 aspect ratio
&.embed-responsive-4by3 {
padding-bottom: 75%;
}
}

0 comments on commit 705ff7f

Please sign in to comment.