Skip to content

v4: Flexbox navbar#21390

Merged
mdo merged 52 commits into
v4-devfrom
v4-tabbar
Dec 22, 2016
Merged

v4: Flexbox navbar#21390
mdo merged 52 commits into
v4-devfrom
v4-tabbar

Conversation

@mdo

@mdo mdo commented Dec 21, 2016

Copy link
Copy Markdown
Member

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
Comment thread scss/_navbar.scss Outdated
display: flex;
flex: 0 0 auto;
flex-wrap: nowrap;
align-items: center;

Copy link
Copy Markdown

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

mdo commented Dec 21, 2016

Copy link
Copy Markdown
Member Author

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
Comment thread scss/_navbar.scss Outdated
margin-left: 0;
}
> .container {
padding-left: 0;

Copy link
Copy Markdown

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
Comment thread scss/_navbar.scss Outdated
// or image file as needed.
.navbar-toggler-icon {
display: inline-block;
content: "";

Copy link
Copy Markdown

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

mdo commented Dec 22, 2016

Copy link
Copy Markdown
Member Author

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

jipexu commented Dec 22, 2016

Copy link
Copy Markdown
Contributor

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

ghost commented Dec 22, 2016

Copy link
Copy Markdown

Sweet! Looking forward to implement it on my project.

@mdo

mdo commented Dec 22, 2016

Copy link
Copy Markdown
Member Author

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