From d0f7637a7d472dd8431b6b61376515bf852edaf8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 10 Sep 2011 22:47:38 -0700 Subject: [PATCH] adding more media sizes --- bootstrap-1.3.0.css | 13 ++++++++++++- bootstrap-1.3.0.min.css | 4 +++- docs/index.html | 34 ++++++++++++++++++++++++++++++++++ lib/patterns.less | 2 ++ 4 files changed, 51 insertions(+), 2 deletions(-) diff --git a/bootstrap-1.3.0.css b/bootstrap-1.3.0.css index 8983090f6..de9b0045f 100644 --- a/bootstrap-1.3.0.css +++ b/bootstrap-1.3.0.css @@ -6,7 +6,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - * Date: Sat Sep 10 22:27:15 PDT 2011 + * Date: Sat Sep 10 22:46:48 PDT 2011 */ /* Reset.less * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). @@ -2237,6 +2237,17 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { } .media-grid { margin-left: -20px; + margin-bottom: 0; + zoom: 1; +} +.media-grid:before, .media-grid:after { + display: table; + content: ""; + zoom: 1; + *display: inline; +} +.media-grid:after { + clear: both; } .media-grid li { display: inline; diff --git a/bootstrap-1.3.0.min.css b/bootstrap-1.3.0.min.css index 9d10e4b23..ee4918fe5 100644 --- a/bootstrap-1.3.0.min.css +++ b/bootstrap-1.3.0.min.css @@ -305,6 +305,8 @@ button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0; .label.warning{background-color:#f89406;} .label.success{background-color:#46a546;} .label.notice{background-color:#62cffc;} -.media-grid{margin-left:-20px;}.media-grid li{display:inline;} +.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;*display:inline;} +.media-grid:after{clear:both;} +.media-grid li{display:inline;} .media-grid .thumbnail{float:left;padding:4px;margin:0 0 20px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid .thumbnail:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} .media-grid img{display:block;} diff --git a/docs/index.html b/docs/index.html index e19059d24..12b8c5291 100644 --- a/docs/index.html +++ b/docs/index.html @@ -712,6 +712,22 @@

Display thumbnails of varying sizes on pages with a low HTML footprint and minimal styles.

+

Example thumbnails

+

Thumbnails in the .media-grid can be any size, but they work best when mapped directly to the built-in Bootstrap grid system. Image widths like 90, 210, and 330 combine with a few pixels of padding to equal the .span2, .span4, and .span6 column sizes.

+

Large

+ +

Medium

+

Small

+
diff --git a/lib/patterns.less b/lib/patterns.less index 6a21b8f62..1e601adf4 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -936,6 +936,8 @@ input[type=submit].btn { .media-grid { margin-left: -20px; + margin-bottom: 0; + .clearfix(); li { display: inline; }