Skip to content

Commit

Permalink
(less) fixes twbs#4935: properly comment responsive image techniques …
Browse files Browse the repository at this point in the history
…and add CSS tests to support
  • Loading branch information
mdo committed Sep 4, 2012
1 parent 1bc42d3 commit b16910e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
6 changes: 4 additions & 2 deletions reset.less
Expand Up @@ -77,9 +77,11 @@ sub {
// -------------------------

img {
max-width: 100%; // Make images inherently responsive
/* Responsive images (ensure images don't scale beyond their parents) */
max-width: 100%; /* Part 1: Set a maxium relative to the parent */
width: auto\9; /* IE7-8 need help adjusting responsive images */
height: auto; // Make images inherently responsive
height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */

vertical-align: middle;
border: 0;
-ms-interpolation-mode: bicubic;
Expand Down
38 changes: 38 additions & 0 deletions tests/css-tests.html
Expand Up @@ -98,6 +98,44 @@ <h6>h6. Heading 6</h6>



<!-- Responsive images
================================================== -->

<div class="page-header">
<h1>Responsive images</h1>
</div>

<div class="row">
<div class="span4">
<img src="http://placehold.it/600x600" height="200">
</div>
<div class="span4">
<img src="http://placehold.it/600x600">
</div>
<div class="span4">
<img src="http://placehold.it/600x600">
</div>
</div>

<br>

<div class="row">
<div class="span4">
<img src="http://placehold.it/600x900" style="width: 200px;">
</div>
<div class="span4">
<img src="http://placehold.it/200x300">
</div>
<div class="span4">
<img src="http://placehold.it/600x600">
</div>
</div>

<br><br>




<!-- Fluid grid
================================================== -->

Expand Down

0 comments on commit b16910e

Please sign in to comment.