1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-12 16:44:17 +02:00

Combine .thumbnail and .img-thumbnail into simpler selectors

This commit is contained in:
Mark Otto
2013-01-17 20:18:03 -08:00
parent ca74b9882b
commit f068cdeb63
3 changed files with 25 additions and 22 deletions

View File

@@ -262,19 +262,6 @@ img {
border-radius: 6px; border-radius: 6px;
} }
.img-thumbnail {
display: block;
display: inline-block;
padding: 4px;
line-height: 20px;
border: 1px solid #ddd;
border-radius: 4px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.img-circle { .img-circle {
border-radius: 500px; border-radius: 500px;
} }
@@ -3932,8 +3919,8 @@ button.close {
margin-top: 5px; margin-top: 5px;
} }
.thumbnail { .thumbnail,
display: block; .img-thumbnail {
padding: 4px; padding: 4px;
line-height: 20px; line-height: 20px;
border: 1px solid #ddd; border: 1px solid #ddd;
@@ -3944,6 +3931,14 @@ button.close {
transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;
} }
.thumbnail {
display: block;
}
.img-thumbnail {
display: inline-block;
}
a.thumbnail:hover { a.thumbnail:hover {
border-color: #428bca; border-color: #428bca;
} }

View File

@@ -78,10 +78,7 @@ img {
} }
// Image thumbnails // Image thumbnails
.img-thumbnail { // See thumbnails.less for `.img-thumbnail`
.thumbnail();
display: inline-block;
}
// Perfect circle // Perfect circle
.img-circle { .img-circle {

View File

@@ -3,15 +3,26 @@
// -------------------------------------------------- // --------------------------------------------------
// The actual thumbnail (can be `a` or `div`) // Base classes
.thumbnail { // For thumbnail block-level composite components and simple image styles
display: block;
// The actual thumbnailed element
// Can be `a`, `div`, or `img`
.thumbnail,
.img-thumbnail {
padding: 4px; padding: 4px;
line-height: @line-height-base; line-height: @line-height-base;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: @border-radius-base; border-radius: @border-radius-base;
.transition(all .2s ease-in-out); .transition(all .2s ease-in-out);
} }
.thumbnail {
display: block;
}
.img-thumbnail {
display: inline-block;
}
// Add a hover state for linked versions only // Add a hover state for linked versions only
a.thumbnail:hover { a.thumbnail:hover {
border-color: @link-color; border-color: @link-color;