mirror of https://github.com/twbs/bootstrap.git
				
				
				
			add basic figure support
This commit is contained in:
		
							parent
							
								
									253bb378e2
								
							
						
					
					
						commit
						08d6dc5b71
					
				| 
						 | 
					@ -667,7 +667,17 @@ mark,
 | 
				
			||||||
  content: "\00A0 \2014";
 | 
					  content: "\00A0 \2014";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.img-responsive, .carousel-inner > .carousel-item > img,
 | 
					.figure > img {
 | 
				
			||||||
 | 
					  margin-bottom: .5rem; 
 | 
				
			||||||
 | 
					  line-height: 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.figure-caption {
 | 
				
			||||||
 | 
					  font-size: 90%;
 | 
				
			||||||
 | 
					  color: #818a91;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.img-responsive, .figure > img, .carousel-inner > .carousel-item > img,
 | 
				
			||||||
.carousel-inner > .carousel-item > a > img {
 | 
					.carousel-inner > .carousel-item > a > img {
 | 
				
			||||||
  display: block;
 | 
					  display: block;
 | 
				
			||||||
  max-width: 100%;
 | 
					  max-width: 100%;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -667,7 +667,17 @@ mark,
 | 
				
			||||||
  content: "\00A0 \2014";
 | 
					  content: "\00A0 \2014";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.img-responsive, .carousel-inner > .carousel-item > img,
 | 
					.figure > img {
 | 
				
			||||||
 | 
					  margin-bottom: .5rem; 
 | 
				
			||||||
 | 
					  line-height: 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.figure-caption {
 | 
				
			||||||
 | 
					  font-size: 90%;
 | 
				
			||||||
 | 
					  color: #818a91;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.img-responsive, .figure > img, .carousel-inner > .carousel-item > img,
 | 
				
			||||||
.carousel-inner > .carousel-item > a > img {
 | 
					.carousel-inner > .carousel-item > a > img {
 | 
				
			||||||
  display: block;
 | 
					  display: block;
 | 
				
			||||||
  max-width: 100%;
 | 
					  max-width: 100%;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -78,3 +78,14 @@ Align images with the [helper float classes](/components/helpers) or [text align
 | 
				
			||||||
  <img src="..." class="img-rounded" alt="...">
 | 
					  <img src="..." class="img-rounded" alt="...">
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
{% endhighlight %}
 | 
					{% endhighlight %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Figures
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Use the included `.figure` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. As a bonus, immediate children images are automatically responsive.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% example html %}
 | 
				
			||||||
 | 
					<figure class="figure">
 | 
				
			||||||
 | 
					  <img data-src="holder.js/400x300" class="img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
 | 
				
			||||||
 | 
					  <figcaption class="figure-caption">A caption for the above image.</figcaption>
 | 
				
			||||||
 | 
					</figure>
 | 
				
			||||||
 | 
					{% endexample %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -667,7 +667,17 @@ mark,
 | 
				
			||||||
  content: "\00A0 \2014";
 | 
					  content: "\00A0 \2014";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.img-responsive, .carousel-inner > .carousel-item > img,
 | 
					.figure > img {
 | 
				
			||||||
 | 
					  margin-bottom: .5rem; 
 | 
				
			||||||
 | 
					  line-height: 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.figure-caption {
 | 
				
			||||||
 | 
					  font-size: 90%;
 | 
				
			||||||
 | 
					  color: #818a91;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.img-responsive, .figure > img, .carousel-inner > .carousel-item > img,
 | 
				
			||||||
.carousel-inner > .carousel-item > a > img {
 | 
					.carousel-inner > .carousel-item > a > img {
 | 
				
			||||||
  display: block;
 | 
					  display: block;
 | 
				
			||||||
  max-width: 100%;
 | 
					  max-width: 100%;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -667,7 +667,17 @@ mark,
 | 
				
			||||||
  content: "\00A0 \2014";
 | 
					  content: "\00A0 \2014";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.img-responsive, .carousel-inner > .carousel-item > img,
 | 
					.figure > img {
 | 
				
			||||||
 | 
					  margin-bottom: .5rem; 
 | 
				
			||||||
 | 
					  line-height: 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.figure-caption {
 | 
				
			||||||
 | 
					  font-size: 90%;
 | 
				
			||||||
 | 
					  color: #818a91;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.img-responsive, .figure > img, .carousel-inner > .carousel-item > img,
 | 
				
			||||||
.carousel-inner > .carousel-item > a > img {
 | 
					.carousel-inner > .carousel-item > a > img {
 | 
				
			||||||
  display: block;
 | 
					  display: block;
 | 
				
			||||||
  max-width: 100%;
 | 
					  max-width: 100%;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
						 | 
					@ -187,3 +187,20 @@ mark,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Figures
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.figure {
 | 
				
			||||||
 | 
					  > img {
 | 
				
			||||||
 | 
					    @extend .img-responsive;
 | 
				
			||||||
 | 
					    line-height: 1;
 | 
				
			||||||
 | 
					    margin-bottom: ($spacer-y / 2);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.figure-caption {
 | 
				
			||||||
 | 
					  font-size: 90%;
 | 
				
			||||||
 | 
					  color: $gray-light;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue