Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4: Various flexbox fixes and updates #21407

Merged
merged 30 commits into from
Dec 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8ee7b91
unify alignment of all these dang navbar forms
mdo Dec 23, 2016
7ee586b
better/more form spacing in navbars
mdo Dec 23, 2016
89a0cd0
update navbars in jumbotron, offcanvas, starter examples to flex vers…
mdo Dec 23, 2016
8e455ff
Undo #21171 (which closed #20977)
mdo Dec 23, 2016
dcbe82b
pull in changes from #19832 to fix offcanvas
mdo Dec 23, 2016
0da87fe
Make .nav flex-powered
mdo Dec 23, 2016
4e38337
Change up the "justified" nav options
mdo Dec 23, 2016
9dff30b
Revamp navs docs
mdo Dec 23, 2016
123e088
fix incorrect class name for inline-flex
mdo Dec 23, 2016
a1f0fa1
Start to blow out and document more flexbox utilities
mdo Dec 23, 2016
2e9c4f0
add docs class for highlighting
mdo Dec 23, 2016
f4884f9
try out alt responsive variation lists
mdo Dec 23, 2016
9c5c258
remove the table classes in favor of lists
mdo Dec 23, 2016
cd5aba9
duplicate of the .flex-fill util
mdo Dec 23, 2016
2d15a1c
indentation
mdo Dec 23, 2016
cd7fd44
document justify-content and align-items utils
mdo Dec 23, 2016
c3ab76d
change presentation of those utils docs
mdo Dec 23, 2016
f998227
document align-content utils
mdo Dec 23, 2016
271509f
align-self docs
mdo Dec 23, 2016
8eb0672
remove old flex utils, update docs to match
mdo Dec 23, 2016
f99be7c
remove unused utils, comment
mdo Dec 24, 2016
3baef00
remove unused media vars, update numbers (oof) /cc @Quy
mdo Dec 24, 2016
8d9f7a7
Update toc numbering (#21422)
Dec 24, 2016
091a25b
add order docs
mdo Dec 24, 2016
c684daa
Merge branch 'flex-hugs-not-bugs' of https://github.com/twbs/bootstra…
mdo Dec 24, 2016
d0d1487
rip numbers
mdo Dec 24, 2016
6109687
nest modal examples css
mdo Dec 24, 2016
cf01923
started fixing nested .bd-example stuff, then rewrote the modal docs
mdo Dec 24, 2016
82664a2
dedupe
mdo Dec 24, 2016
2a2d1b9
fixes #21423 by updating docs to mention flex display instead of inli…
mdo Dec 24, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/_data/breakpoints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- breakpoint: xs
abbr: ""
name: Extra small
min-width: 0px
container: ""

- breakpoint: sm
abbr: -sm
name: Small
min-width: 576px
container: 540px

- breakpoint: md
abbr: -md
name: Medium
min-width: 768px
container: 720px

- breakpoint: lg
abbr: -lg
name: Large
min-width: 992px
container: 960px

- breakpoint: xl
abbr: -xl
name: Extra large
min-width: 1200px
container: 1140px
1 change: 1 addition & 0 deletions docs/_data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
- title: Clearfix
- title: Close icon
- title: Colors
- title: Flexbox
- title: Display property
- title: Image replacement
- title: Invisible content
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/nav-home.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</nav>
{% endcomment %}

<div class="d-flex flex-items-between hidden-lg-up">
<div class="d-flex justify-content-between hidden-lg-up">
<a class="navbar-brand" href="{{ site.baseurl }}/">
Bootstrap
</a>
Expand Down
37 changes: 22 additions & 15 deletions docs/assets/scss/_component-examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
background-color: rgba(255,0,0,.1);
}

.bd-highlight {
background-color: rgba($bd-purple, .15);
border: 1px solid rgba($bd-purple, .15);
}


//
// Container illustrations
Expand Down Expand Up @@ -236,21 +241,23 @@

// Example modals
.bd-example-modal {
background-color: #f5f5f5;
}
.bd-example-modal .modal {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
z-index: 1;
display: block;
}
.bd-example-modal .modal-dialog {
left: auto;
margin-right: auto;
margin-left: auto;
background-color: #fafafa;

.modal {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
z-index: 1;
display: block;
}

.modal-dialog {
left: auto;
margin-right: auto;
margin-left: auto;
}
}

// Example dropdowns
Expand Down
2 changes: 1 addition & 1 deletion docs/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ The `.form-group` class is the easiest way to add some structure to forms. Its o

Use the `.form-inline` class to display a series of labels, form controls, and buttons on a single horizontal row. Form controls within inline forms vary slightly from their default states.

- Controls are `display: inline-block` (or `flex` when enabled) to provide alignment control via `vertical-align` and `margin`. Those also means you'll have some HTML character spaces between elements by default.
- Controls are `display: flex`, collapsing any HTML white space and allowing you to provide alignment control with [spacing]({{ site.baseurl }}/utilities/spacing/) and [flexbox]({{ site.baseurl }}/utilities/flexbox/) utilities.
- Controls and input groups receive `width: auto` to override the Bootstrap default `width: 100%`.
- Controls **only appear inline in viewports that are at least 576px wide** to account for narrow viewports on mobile devices.

Expand Down
8 changes: 4 additions & 4 deletions docs/components/list-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ The most basic list group is simply an unordered list with list items, and the p

## Badge

Add badges to any list group item to show unread counts, activity, and more with the help of some utilities. Note the [`flex-items-between` utility class]({{ site.baseurl }}/layout/grid/#horizontal-alignment), the badge's placement, and the lack of a float and margin utilities on the badges.
Add badges to any list group item to show unread counts, activity, and more with the help of some utilities. Note the [`justify-content-between` utility class]({{ site.baseurl }}/layout/grid/#horizontal-alignment), the badge's placement, and the lack of a float and margin utilities on the badges.

{% highlight html %}
<ul class="list-group">
<li class="list-group-item flex-items-between">
<li class="list-group-item justify-content-between">
Cras justo odio
<span class="badge badge-default badge-pill">14</span>
</li>
<li class="list-group-item flex-items-between">
<li class="list-group-item justify-content-between">
Dapibus ac facilisis in
<span class="badge badge-default badge-pill">2</span>
</li>
<li class="list-group-item flex-items-between">
<li class="list-group-item justify-content-between">
Morbi leo risus
<span class="badge badge-default badge-pill">1</span>
</li>
Expand Down
436 changes: 278 additions & 158 deletions docs/components/modal.md

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions docs/components/navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ Here's an example of all the sub-components included in a responsive light-theme
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline mt-2 mt-md-0">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-lg-0" type="submit">Search</button>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Expand Down Expand Up @@ -193,19 +193,19 @@ Place various form controls and components within a navbar with `.form-inline`.
{% example html %}
<nav class="navbar navbar-light bg-faded">
<form class="form-inline">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-lg-0" type="submit">Search</button>
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</nav>
{% endexample %}

Align the contents of your inline forms with utilities as needed.

{% example html %}
<nav class="navbar navbar-light bg-faded flex-items-right">
<nav class="navbar navbar-light bg-faded justify-content-end">
<form class="form-inline">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-lg-0" type="submit">Search</button>
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</nav>
{% endexample %}
Expand Down Expand Up @@ -300,8 +300,8 @@ Theming the navbar has never been easier thanks to the combination of theming cl
</li>
</ul>
<form class="form-inline">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-info my-2 my-lg-0" type="submit">Search</button>
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-info my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Expand All @@ -328,8 +328,8 @@ Theming the navbar has never been easier thanks to the combination of theming cl
</li>
</ul>
<form class="form-inline">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-secondary my-2 my-lg-0" type="submit">Search</button>
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-secondary my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Expand All @@ -356,8 +356,8 @@ Theming the navbar has never been easier thanks to the combination of theming cl
</li>
</ul>
<form class="form-inline">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-primary my-2 my-lg-0" type="submit">Search</button>
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-primary my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Expand Down Expand Up @@ -449,9 +449,9 @@ With no `.navbar-brand` shown in lowest breakpoint:
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline mt-2 mt-lg-0">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-lg-0" type="submit">Search</button>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Expand All @@ -478,9 +478,9 @@ With a brand name shown on the left and toggler on the right:
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
<form class="form-inline mt-2 mt-lg-0">
<input class="form-control mr-md-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-lg-0" type="submit">Search</button>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
</div>
</nav>
Expand Down
Loading