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: Flexbox navbar #21390

Merged
merged 52 commits into from
Dec 22, 2016
Merged

v4: Flexbox navbar #21390

merged 52 commits into from
Dec 22, 2016

Conversation

mdo
Copy link
Member

@mdo mdo commented Dec 21, 2016

Following up on #21389, this PR is a WIP for adding the flexbox navbar. It started off as a late night experiment again with display: table—which was pretty awesome mind you—and got me thinking heavily about flex options. Given we're going all flex now, this approach gets even easier.

Still a ton to do, but wanted to open this sooner than later.


Done

Todo

mdo added 4 commits December 21, 2016 00:40
- drop the table styles, use flex
- remove commented out code
- consolidate styles a bit
- add a huge flex-grow to the nav, making the assumption you want nav to take up most space
@mdo mdo added this to the v4.0.0-alpha.6 milestone Dec 21, 2016
display: flex;
flex: 0 0 auto;
flex-wrap: nowrap;
align-items: center;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered display, flex, flex-wrap, width, align-items

@mdo
Copy link
Member Author

mdo commented Dec 21, 2016

Updated the examples/navbar/ to be examples/navbars/ to show some variations to things the styling and subcomponents within a navbar.

screen shot 2016-12-21 at 2 31 11 pm

mdo added 4 commits December 21, 2016 17:51
…ble class generation area; this way the .navbar-toggleable-* goes on .navbar, easily affecting everything that needs updating for each breakpoint's use
margin-left: 0;
}
> .container {
padding-left: 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered padding-right, padding-left

mdo added 3 commits December 21, 2016 21:40
…schemes, renaming .navbar-dark to .navbar-inverse (matching .card-inverse in the process and restoring v3's inverted class name)
- Require inner element for the icon for improved customization (e.g., drop the element to replace it with your own icon font or SVG)
- Tighten up padding
- Better comments
// or image file as needed.
.navbar-toggler-icon {
display: inline-block;
content: "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered display, width, height, vertical-align, content, background, background-size

@mdo
Copy link
Member Author

mdo commented Dec 22, 2016

Here's an updated screenshot and live demo in a JS Bin for folks to play with.

screen shot 2016-12-21 at 10 25 18 pm

@jipexu
Copy link
Contributor

jipexu commented Dec 22, 2016

coool !!
in the example https://output.jsbin.com/sapiyok
the Centered nav only (is NOT centered @ small screen) is it a choice or little mistake ?

thanks

@ghost
Copy link

ghost commented Dec 22, 2016

Sweet! Looking forward to implement it on my project.

@mdo
Copy link
Member Author

mdo commented Dec 22, 2016

the Centered nav only (is NOT centered @ small screen) is it a choice or little mistake ?

By choice; this is easily customized though with a different utility class.

@mdo mdo merged commit d86a1db into v4-dev Dec 22, 2016
@mdo mdo deleted the v4-tabbar branch December 22, 2016 21:48
@mdo mdo mentioned this pull request Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants