From ddc28cde21c46eb2c55bd764099f1558d3d2ea9a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 3 Sep 2012 17:35:35 -0700 Subject: [PATCH] (less) fixes #4935: properly comment responsive image techniques and add CSS tests to support --- reset.less | 6 ++++-- tests/css-tests.html | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/reset.less b/reset.less index 3261124e0f8b..2901a85c80dd 100644 --- a/reset.less +++ b/reset.less @@ -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; diff --git a/tests/css-tests.html b/tests/css-tests.html index 4715143397ac..c0cb1485e983 100644 --- a/tests/css-tests.html +++ b/tests/css-tests.html @@ -98,6 +98,44 @@
h6. Heading 6
+ + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +

+ + + +