add basic figure support

This commit is contained in:
Mark Otto 2015-08-09 21:42:47 -07:00
parent 253bb378e2
commit 08d6dc5b71
18 changed files with 76 additions and 8 deletions

View file

@ -667,7 +667,17 @@ mark,
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 {
display: block;
max-width: 100%;

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -667,7 +667,17 @@ mark,
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 {
display: block;
max-width: 100%;

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -78,3 +78,14 @@ Align images with the [helper float classes](/components/helpers) or [text align
<img src="..." class="img-rounded" alt="...">
</div>
{% 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 %}

View file

@ -667,7 +667,17 @@ mark,
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 {
display: block;
max-width: 100%;

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -667,7 +667,17 @@ mark,
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 {
display: block;
max-width: 100%;

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -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;
}