Skip to content

Commit 821f719

Browse files
authored
Merge pull request #20684 from twbs/v4-utils
v4: The Utilities Update
2 parents b6fe0d4 + 6c86766 commit 821f719

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+608
-491
lines changed

dist/css/bootstrap-flex.css

Lines changed: 104 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap-flex.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap-flex.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap-flex.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap.css

Lines changed: 104 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/bootstrap.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/_data/nav.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
- title: Scrollspy
5252
- title: Tag
5353
- title: Tooltips
54-
- title: Utilities
5554

5655
- title: Utilities
5756
pages:
57+
- title: Borders
5858
- title: Clearfix
5959
- title: Close icon
6060
- title: Colors

docs/_includes/nav-home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<header class="navbar navbar-light navbar-static-top bd-navbar">
22
<div class="container">
33
{% comment %}
4-
<nav class="nav navbar-nav pull-xs-right">
4+
<nav class="nav navbar-nav float-xs-right">
55
<div class="nav-item dropdown">
66
<a class="nav-item nav-link dropdown-toggle" href="#" id="bd-versions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
77
v{{ site.current_version }}
@@ -27,7 +27,7 @@
2727

2828
<nav>
2929
<div class="clearfix">
30-
<button class="navbar-toggler pull-xs-right hidden-sm-up" type="button" data-toggle="collapse" data-target="#bd-main-nav" aria-controls="bd-main-nav" aria-expanded="false" aria-label="Toggle navigation"></button>
30+
<button class="navbar-toggler float-xs-right hidden-sm-up" type="button" data-toggle="collapse" data-target="#bd-main-nav" aria-controls="bd-main-nav" aria-expanded="false" aria-label="Toggle navigation"></button>
3131
<a class="navbar-brand hidden-sm-up" href="{{ site.baseurl }}/">
3232
Bootstrap
3333
</a>

docs/assets/css/docs.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/components/alerts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Alerts can also contain additional HTML elements like headings and paragraphs.
6161
<div class="alert alert-success" role="alert">
6262
<h4 class="alert-heading">Well done!</h4>
6363
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
64-
<p class="m-b-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
64+
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
6565
</div>
6666
{% endexample %}
6767

docs/components/card.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Use Bootstrap's nav pills or tabs within a card header. Be sure to always includ
231231
{% example html %}
232232
<div class="card text-xs-center">
233233
<div class="card-header">
234-
<ul class="nav nav-tabs card-header-tabs pull-xs-left">
234+
<ul class="nav nav-tabs card-header-tabs float-xs-left">
235235
<li class="nav-item">
236236
<a class="nav-link active" href="#">Active</a>
237237
</li>
@@ -254,7 +254,7 @@ Use Bootstrap's nav pills or tabs within a card header. Be sure to always includ
254254
{% example html %}
255255
<div class="card text-xs-center">
256256
<div class="card-header">
257-
<ul class="nav nav-pills card-header-pills pull-xs-left">
257+
<ul class="nav nav-pills card-header-pills float-xs-left">
258258
<li class="nav-item">
259259
<a class="nav-link active" href="#">Active</a>
260260
</li>

docs/components/collapse.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Extend the default collapse behavior to create an accordion.
4646
<div id="accordion" role="tablist" aria-multiselectable="true">
4747
<div class="card">
4848
<div class="card-header" role="tab" id="headingOne">
49-
<h5 class="m-b-0">
49+
<h5 class="mb-0">
5050
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
5151
Collapsible Group Item #1
5252
</a>
@@ -58,7 +58,7 @@ Extend the default collapse behavior to create an accordion.
5858
</div>
5959
<div class="card">
6060
<div class="card-header" role="tab" id="headingTwo">
61-
<h5 class="m-b-0">
61+
<h5 class="mb-0">
6262
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
6363
Collapsible Group Item #2
6464
</a>
@@ -70,7 +70,7 @@ Extend the default collapse behavior to create an accordion.
7070
</div>
7171
<div class="card">
7272
<div class="card-header" role="tab" id="headingThree">
73-
<h5 class="m-b-0">
73+
<h5 class="mb-0">
7474
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
7575
Collapsible Group Item #3
7676
</a>

docs/components/forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ Add other states to your custom forms with our validation classes.
846846
<span class="custom-control-description">Check this custom checkbox</span>
847847
</label>
848848
</div>
849-
<div class="form-group has-danger m-b-0">
849+
<div class="form-group has-danger mb-0">
850850
<label class="custom-control custom-checkbox">
851851
<input type="checkbox" class="custom-control-input">
852852
<span class="custom-control-indicator"></span>

docs/components/jumbotron.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A lightweight, flexible component that can optionally extend the entire viewport
1313
<div class="jumbotron">
1414
<h1 class="display-3">Hello, world!</h1>
1515
<p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
16-
<hr class="m-y-2">
16+
<hr class="my-2">
1717
<p>It uses utility classes for typography and spacing to space content out within the larger container.</p>
1818
<p class="lead">
1919
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>

docs/components/list-group.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ Add tags to any list group item to show unread counts, activity, etc.
3232
{% example html %}
3333
<ul class="list-group">
3434
<li class="list-group-item">
35-
<span class="tag tag-default tag-pill pull-xs-right">14</span>
35+
<span class="tag tag-default tag-pill float-xs-right">14</span>
3636
Cras justo odio
3737
</li>
3838
<li class="list-group-item">
39-
<span class="tag tag-default tag-pill pull-xs-right">2</span>
39+
<span class="tag tag-default tag-pill float-xs-right">2</span>
4040
Dapibus ac facilisis in
4141
</li>
4242
<li class="list-group-item">
43-
<span class="tag tag-default tag-pill pull-xs-right">1</span>
43+
<span class="tag tag-default tag-pill float-xs-right">1</span>
4444
Morbi leo risus
4545
</li>
4646
</ul>

docs/components/navbar.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Here's an example of all the sub-components included in a default, light navbar:
4848
<a class="nav-link" href="#">About</a>
4949
</li>
5050
</ul>
51-
<form class="form-inline pull-xs-right">
51+
<form class="form-inline float-xs-right">
5252
<input class="form-control" type="text" placeholder="Search">
5353
<button class="btn btn-outline-success" type="submit">Search</button>
5454
</form>
@@ -65,7 +65,7 @@ The `.navbar-brand` can be applied to most elements, but an anchor works best as
6565
</nav>
6666

6767
<nav class="navbar navbar-light bg-faded">
68-
<h1 class="navbar-brand m-b-0">Navbar</h1>
68+
<h1 class="navbar-brand mb-0">Navbar</h1>
6969
</nav>
7070

7171
{% endexample %}
@@ -130,7 +130,7 @@ Here are some examples to show what we mean.
130130
<a class="nav-link" href="#">About</a>
131131
</li>
132132
</ul>
133-
<form class="form-inline pull-xs-right">
133+
<form class="form-inline float-xs-right">
134134
<input class="form-control" type="text" placeholder="Search">
135135
<button class="btn btn-outline-info" type="submit">Search</button>
136136
</form>
@@ -151,7 +151,7 @@ Here are some examples to show what we mean.
151151
<a class="nav-link" href="#">About</a>
152152
</li>
153153
</ul>
154-
<form class="form-inline pull-xs-right">
154+
<form class="form-inline float-xs-right">
155155
<input class="form-control" type="text" placeholder="Search">
156156
<button class="btn btn-outline-secondary" type="submit">Search</button>
157157
</form>
@@ -172,7 +172,7 @@ Here are some examples to show what we mean.
172172
<a class="nav-link" href="#">About</a>
173173
</li>
174174
</ul>
175-
<form class="form-inline pull-xs-right">
175+
<form class="form-inline float-xs-right">
176176
<input class="form-control" type="text" placeholder="Search">
177177
<button class="btn btn-outline-primary" type="submit">Search</button>
178178
</form>
@@ -244,7 +244,7 @@ Our collapse plugin allows you to use a `<button>` or `<a>` to toggle hidden con
244244
<nav class="navbar navbar-light bg-faded">
245245
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation"></button>
246246
<div class="collapse" id="exCollapsingNavbar">
247-
<div class="bg-inverse p-a-1">
247+
<div class="bg-inverse p-1">
248248
<h4>Collapsed content</h4>
249249
<span class="text-muted">Toggleable via the navbar brand.</span>
250250
</div>

docs/content/figures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Use the included `.figure` , `.figure-img` and `.figure-caption` classes to prov
1111

1212
{% example html %}
1313
<figure class="figure">
14-
<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.">
14+
<img data-src="holder.js/400x300" class="figure-img img-fluid rounded" alt="A generic square placeholder image with rounded corners in a figure.">
1515
<figcaption class="figure-caption">A caption for the above image.</figcaption>
1616
</figure>
1717
{% endexample %}
@@ -20,7 +20,7 @@ Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl
2020

2121
{% example html %}
2222
<figure class="figure">
23-
<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.">
23+
<img data-src="holder.js/400x300" class="figure-img img-fluid rounded" alt="A generic square placeholder image with rounded corners in a figure.">
2424
<figcaption class="figure-caption text-xs-right">A caption for the above image.</figcaption>
2525
</figure>
2626
{% endexample %}

docs/content/images.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,52 +30,48 @@ Images in Bootstrap are made responsive with `.img-fluid`. `max-width: 100%;` an
3030
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.
3131
{% endcallout %}
3232

33-
## Image shapes
33+
## Image thumbnails
3434

35-
Add classes to an `<img>` element to easily style images in any project.
35+
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.
3636

3737
<div class="bd-example bd-example-images">
38-
<img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners">
39-
<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">
4038
<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">
4139
</div>
4240

4341
{% highlight html %}
44-
<img src="..." alt="..." class="img-rounded">
45-
<img src="..." alt="..." class="img-circle">
4642
<img src="..." alt="..." class="img-thumbnail">
4743
{% endhighlight %}
4844

4945
## Aligning images
5046

51-
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).
47+
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).
5248

5349
<div class="bd-example bd-example-images">
54-
<img data-src="holder.js/200x200" class="img-rounded pull-xs-left" alt="A generic square placeholder image with rounded corners">
55-
<img data-src="holder.js/200x200" class="img-rounded pull-xs-right" alt="A generic square placeholder image with rounded corners">
50+
<img data-src="holder.js/200x200" class="rounded float-xs-left" alt="A generic square placeholder image with rounded corners">
51+
<img data-src="holder.js/200x200" class="rounded float-xs-right" alt="A generic square placeholder image with rounded corners">
5652
</div>
5753

5854
{% highlight html %}
59-
<img src="..." class="img-rounded pull-xs-left" alt="...">
60-
<img src="..." class="img-rounded pull-xs-right" alt="...">
55+
<img src="..." class="rounded float-xs-left" alt="...">
56+
<img src="..." class="rounded float-xs-right" alt="...">
6157
{% endhighlight %}
6258

6359
<div class="bd-example bd-example-images">
64-
<img data-src="holder.js/200x200" class="img-rounded m-x-auto d-block" alt="A generic square placeholder image with rounded corners">
60+
<img data-src="holder.js/200x200" class="rounded mx-auto d-block" alt="A generic square placeholder image with rounded corners">
6561
</div>
6662

6763
{% highlight html %}
68-
<img src="..." class="img-rounded m-x-auto d-block" alt="...">
64+
<img src="..." class="rounded mx-auto d-block" alt="...">
6965
{% endhighlight %}
7066

7167
<div class="bd-example bd-example-images">
7268
<div class="text-xs-center">
73-
<img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners">
69+
<img data-src="holder.js/200x200" class="rounded" alt="A generic square placeholder image with rounded corners">
7470
</div>
7571
</div>
7672

7773
{% highlight html %}
7874
<div class="text-xs-center">
79-
<img src="..." class="img-rounded" alt="...">
75+
<img src="..." class="rounded" alt="...">
8076
</div>
8177
{% endhighlight %}

docs/content/typography.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ For quoting blocks of content from another source within your document. Wrap `<b
169169

170170
{% example html %}
171171
<blockquote class="blockquote">
172-
<p class="m-b-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
172+
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
173173
</blockquote>
174174
{% endexample %}
175175

@@ -179,7 +179,7 @@ Add a `<footer class="blockquote-footer">` for identifying the source. Wrap the
179179

180180
{% example html %}
181181
<blockquote class="blockquote">
182-
<p class="m-b-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
182+
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
183183
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
184184
</blockquote>
185185
{% endexample %}
@@ -190,7 +190,7 @@ Add `.blockquote-reverse` for a blockquote with right-aligned content.
190190

191191
{% example html %}
192192
<blockquote class="blockquote blockquote-reverse">
193-
<p class="m-b-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
193+
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
194194
<footer class="blockquote-footer">Someone famous in <cite title="Source Title">Source Title</cite></footer>
195195
</blockquote>
196196
{% endexample %}

0 commit comments

Comments
 (0)