]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Merge pull request #10662 from kevinlisota/thumbnail-images
authorMark Otto <markdotto@gmail.com>
Mon, 2 Dec 2013 05:18:41 +0000 (21:18 -0800)
committerMark Otto <markdotto@gmail.com>
Mon, 2 Dec 2013 05:18:41 +0000 (21:18 -0800)
add responsive CSS to hyperlinked images when thumbnail caption markup used

1  2 
less/thumbnails.less

index 43e7d1d26bb4a8acb921fea35feda073ee7e5be8,f6064a2450f2be655e9c0101de683d85965c3215..11aa283a0e3912e951cb8f426056452055e28a51
@@@ -5,31 -5,29 +5,32 @@@
  
  // Mixin and adjust the regular image class
  .thumbnail {
 -  .img-thumbnail();
 -  display: block; // Override the inline-block from `.img-thumbnail`
 +  display: block;
 +  padding: @thumbnail-padding;
    margin-bottom: @line-height-computed;
 +  line-height: @line-height-base;
 +  background-color: @thumbnail-bg;
 +  border: 1px solid @thumbnail-border;
 +  border-radius: @thumbnail-border-radius;
 +  .transition(all .2s ease-in-out);
  
-   > img {
+   > img,
+   a > img {
      .img-responsive();
 +    margin-left: auto;
 +    margin-right: auto;
    }
 -}
 -
  
 -// Add a hover state for linked versions only
 -a.thumbnail:hover,
 -a.thumbnail:focus {
 -  border-color: @link-color;
 -}
 +  // Add a hover state for linked versions only
 +  a&:hover,
 +  a&:focus,
 +  a&.active {
 +    border-color: @link-color;
 +  }
  
 -// Images and captions
 -.thumbnail > img {
 -  margin-left: auto;
 -  margin-right: auto;
 -}
 -.thumbnail .caption {
 -  padding: @thumbnail-caption-padding;
 -  color: @thumbnail-caption-color;
 +  // Image captions
 +  .caption {
 +    padding: @thumbnail-caption-padding;
 +    color: @thumbnail-caption-color;
 +  }
  }