title: How to correctly use the Thumbnail component in React Bootstrap?
body: <p>This is my mark-up:</p>
  
  <pre><code>&lt;Thumbnail src="/path/to/image"  /&gt;
  </code></pre>
  
  <p>This is the generated html:</p>
  
  <pre><code>&lt;div src="/path/to/image" class="thumbnail" &gt;&lt;img src="/path/to/image" &gt;&lt;/div&gt;
  </code></pre>
  
  <p>This is the CSS (which comes from bootstrap-sass):</p>
  
  <pre><code>.thumbnail {
      display: block;
      padding: 4px;
      margin-bottom: 20px;
      line-height: 1.42857;
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 4px;
      -webkit-transition: border 0.2s ease-in-out;
      -o-transition: border 0.2s ease-in-out;
      transition: border 0.2s ease-in-out;
  }
  
  .thumbnail &gt; img, .thumbnail a &gt; img {
      display: block;
      max-width: 100%;
      height: auto;
      margin-left: auto;
      margin-right: auto;
  }
  </code></pre>
  
  <p>And this is the result:</p>
  
  <p><a href="https://i.stack.imgur.com/OBPqs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OBPqs.png" alt="pic"></a></p>
  
  <p>The issue is that the border is on the div. Because the image is smaller than the div this looks odd. I would prefer the border to be on the image. The second selector above, thumbnail > img, uses max-width, and this is essential to prevent a hi-resolution image springing out of its container. So - given these CSS rules to prevent the image springing out it looks the Thumbnail has correctly put the .thumbnail class on the containing div. But then the border is on the containing div, not on the img tag.</p>
  
  <p>If I just put the Bootstrap img-thumbnail class directly on the image (and forget React-Bootstrap Thumbnail altogether) I get the result I want. </p>
  
  <p><a href="https://i.stack.imgur.com/ykojo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ykojo.png" alt="pic"></a>  .img-thumbnail has the max-width and the border. </p>
  
  <p>It looks like .thumbnail is coming from bootstrap-sass. So, overall, I'm not sure if this is a problem with react-bootstrap or bootstrap-sass. At any event the React-Bootstrap Thumbnail component does not work as I would  expect. Is this an error or user error?</p>