diff options
| author | Mark Otto <[email protected]> | 2013-06-28 00:09:10 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-06-28 00:09:10 -0700 |
| commit | 09cdee2f03aaad5c5a767fbec2e3896ad3d1f980 (patch) | |
| tree | 74724b9edea8a32aa53183b27f485034bcb9805d /less/scaffolding.less | |
| parent | 1a09eada35259de198ffad56a460c6ffafe890a4 (diff) | |
| download | bootstrap-09cdee2f03aaad5c5a767fbec2e3896ad3d1f980.tar.xz bootstrap-09cdee2f03aaad5c5a767fbec2e3896ad3d1f980.zip | |
Overall responsive `img` styles
`img`s are no longer responsive by default. Instead, use
`.img-responsive` as a class or mixin. Existing `.thumbnail > img` and
`.img-thumbnail` classes now make use of this as a mixin as well.
Diffstat (limited to 'less/scaffolding.less')
| -rw-r--r-- | less/scaffolding.less | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/less/scaffolding.less b/less/scaffolding.less index e74a4db1c..79447c3f5 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -59,12 +59,14 @@ a:focus { // ------------------------- img { - // Responsive images (ensure images don't scale beyond their parents) + vertical-align: middle; +} + +// Responsive images (ensure images don't scale beyond their parents) +.img-responsive { + display: block; max-width: 100%; // Part 1: Set a maximum relative to the parent height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching - - // Match vertical alignment with other comment elements - vertical-align: middle; } // Rounded corners |
