diff options
| author | Mark Otto <[email protected]> | 2016-10-09 14:54:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-10-09 14:54:57 -0700 |
| commit | 821f7193676fae66b1065168b650ffd18fd87a6c (patch) | |
| tree | c924822f48d8ace8c989ba587eb61c8c441c5a23 /docs/content | |
| parent | b6fe0d45a4faf80fb98a21d638ca5551e2117c9c (diff) | |
| parent | 6c867667a19dcb1243153855d00e36e5ecd599d0 (diff) | |
| download | bootstrap-821f7193676fae66b1065168b650ffd18fd87a6c.tar.xz bootstrap-821f7193676fae66b1065168b650ffd18fd87a6c.zip | |
Merge pull request #20684 from twbs/v4-utils
v4: The Utilities Update
Diffstat (limited to 'docs/content')
| -rw-r--r-- | docs/content/figures.md | 4 | ||||
| -rw-r--r-- | docs/content/images.md | 26 | ||||
| -rw-r--r-- | docs/content/typography.md | 6 |
3 files changed, 16 insertions, 20 deletions
diff --git a/docs/content/figures.md b/docs/content/figures.md index e1f8f93d2..b85ca8a4a 100644 --- a/docs/content/figures.md +++ b/docs/content/figures.md @@ -11,7 +11,7 @@ Use the included `.figure` , `.figure-img` and `.figure-caption` classes to prov {% example html %} <figure class="figure"> - <img data-src="holder.js/400x300" class="figure-img img-fluid img-rounded" alt="A generic square placeholder image with rounded corners in a figure."> + <img data-src="holder.js/400x300" class="figure-img img-fluid 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 %} @@ -20,7 +20,7 @@ Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl {% example html %} <figure class="figure"> - <img data-src="holder.js/400x300" class="figure-img img-fluid img-rounded" alt="A generic square placeholder image with rounded corners in a figure."> + <img data-src="holder.js/400x300" class="figure-img img-fluid rounded" alt="A generic square placeholder image with rounded corners in a figure."> <figcaption class="figure-caption text-xs-right">A caption for the above image.</figcaption> </figure> {% endexample %} diff --git a/docs/content/images.md b/docs/content/images.md index de8677f3d..da342b546 100644 --- a/docs/content/images.md +++ b/docs/content/images.md @@ -30,52 +30,48 @@ Images in Bootstrap are made responsive with `.img-fluid`. `max-width: 100%;` an In Internet Explorer 9-10, SVG images with `.img-fluid` are disproportionately sized. To fix this, add `width: 100% \9;` where necessary. This fix improperly sizes other image formats, so Bootstrap doesn't apply it automatically. {% endcallout %} -## Image shapes +## Image thumbnails -Add classes to an `<img>` element to easily style images in any project. +In addition to our [border-radius utilities]({{ site.baseurl }}/utilities/borders/), you can use `.img-thumbnail` to give an image a rounded 1px border appearance. <div class="bd-example bd-example-images"> - <img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners"> - <img data-src="holder.js/200x200" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible"> <img data-src="holder.js/200x200" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera"> </div> {% highlight html %} -<img src="..." alt="..." class="img-rounded"> -<img src="..." alt="..." class="img-circle"> <img src="..." alt="..." class="img-thumbnail"> {% endhighlight %} ## Aligning images -Align images with the [helper float classes]({{ site.baseurl }}/utilities/responsive-helpers/#responsive-floats) or [text alignment classes]({{ site.baseurl }}/utilities/typography/#text-alignment). `block`-level images can be centered using [the `.m-x-auto` margin utility class]({{ site.baseurl }}/spacing/#horizontal-centering). +Align images with the [helper float classes]({{ site.baseurl }}/utilities/responsive-helpers/#responsive-floats) or [text alignment classes]({{ site.baseurl }}/utilities/typography/#text-alignment). `block`-level images can be centered using [the `.mx-auto` margin utility class]({{ site.baseurl }}/utilities/spacing/#horizontal-centering). <div class="bd-example bd-example-images"> - <img data-src="holder.js/200x200" class="img-rounded pull-xs-left" alt="A generic square placeholder image with rounded corners"> - <img data-src="holder.js/200x200" class="img-rounded pull-xs-right" alt="A generic square placeholder image with rounded corners"> + <img data-src="holder.js/200x200" class="rounded float-xs-left" alt="A generic square placeholder image with rounded corners"> + <img data-src="holder.js/200x200" class="rounded float-xs-right" alt="A generic square placeholder image with rounded corners"> </div> {% highlight html %} -<img src="..." class="img-rounded pull-xs-left" alt="..."> -<img src="..." class="img-rounded pull-xs-right" alt="..."> +<img src="..." class="rounded float-xs-left" alt="..."> +<img src="..." class="rounded float-xs-right" alt="..."> {% endhighlight %} <div class="bd-example bd-example-images"> - <img data-src="holder.js/200x200" class="img-rounded m-x-auto d-block" alt="A generic square placeholder image with rounded corners"> + <img data-src="holder.js/200x200" class="rounded mx-auto d-block" alt="A generic square placeholder image with rounded corners"> </div> {% highlight html %} -<img src="..." class="img-rounded m-x-auto d-block" alt="..."> +<img src="..." class="rounded mx-auto d-block" alt="..."> {% endhighlight %} <div class="bd-example bd-example-images"> <div class="text-xs-center"> - <img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners"> + <img data-src="holder.js/200x200" class="rounded" alt="A generic square placeholder image with rounded corners"> </div> </div> {% highlight html %} <div class="text-xs-center"> - <img src="..." class="img-rounded" alt="..."> + <img src="..." class="rounded" alt="..."> </div> {% endhighlight %} diff --git a/docs/content/typography.md b/docs/content/typography.md index 1d5c3589d..ae1378422 100644 --- a/docs/content/typography.md +++ b/docs/content/typography.md @@ -169,7 +169,7 @@ For quoting blocks of content from another source within your document. Wrap `<b {% example html %} <blockquote class="blockquote"> - <p class="m-b-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> + <p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> </blockquote> {% endexample %} @@ -179,7 +179,7 @@ Add a `<footer class="blockquote-footer">` for identifying the source. Wrap the {% example html %} <blockquote class="blockquote"> - <p class="m-b-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> + <p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer> </blockquote> {% endexample %} @@ -190,7 +190,7 @@ Add `.blockquote-reverse` for a blockquote with right-aligned content. {% example html %} <blockquote class="blockquote blockquote-reverse"> - <p class="m-b-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> + <p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p> <footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer> </blockquote> {% endexample %} |
