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

v4: Various flexbox fixes and updates #21407

merged 30 commits into from
Dec 24, 2016

Conversation

mdo
Copy link
Member

@mdo mdo commented Dec 23, 2016

Starting a catchall branch of sorts to clean some stuff up around the move to flexbox.

Changes so far

  • Fixed inline forms in responsive navbars. The use of my- utilities on the buttons here caused the inputs to grow to match the computed height of the button plus those margins, so things looked broken. I've changed the utilities here and fixed it all up.

  • Updated the three remaining examples to use the new navbar—starter template, jumbotron, and offcanvas are now all up to speed.

  • Speaking of the offcanvas example, that's also been fixed. I pulled in the changes from fix the offcanvas example #19832.

  • Huge flexbox utilities overhaul. Replaced all existing .flex-* utilities that had custom names with new utilities named after their property: value pair (e.g., .flex-items-between is now .justify-content-between). Also added brand new docs to showcase all these new utils.

  • Rewrote modal docs while aiming to fix some double borders in modal examples.


Still to do

Flexbox bugs

  • Inline forms in navbar examples across the board are fubared
  • Forgot to update to flexbox navbar in starter template, jumbotron, and offcanvas examples.
  • Fix offcanvas menu breakage
  • Inline form buttons of mixed sizes are resized to be equal height
  • Inline form checkbox text is too close to the control
  • Custom selects are wrong height
  • Static control example for inline form lacks padding utils
  • Inline help text example is poorly aligned

Flexbox todos

  • Remake form checks/radios with flexbox instead of abs position nevermind i'm an idiot, can't do this because of our markup
  • Remake dismissible alert with flexbox instead of abs position would require extra markup to do, skipping
  • Redo modal positioning with flexbox (hopefully we can vertically center and keep the scroll) nevermind, going to do this later; too many other changes to make alongside this.
  • Remake navs with flexbox instead of floats
  • Remake pagination with flexbox instead of floats
  • Blow out flex utils, document them all
  • Modal with flexbox—see v4: Flex modal #21425

Docs bugs

  • Modal demos have nested example markup

@mdo mdo added this to the v4.0.0-alpha.6 milestone Dec 23, 2016
Turns out we did have the correct height calculation with our custom selects. The problem was we lacked a shared line-height with our buttons and inputs.

This restores the previous `calc` math and adds a line-height that reuses the input line-height.
@mdo mdo mentioned this pull request Dec 23, 2016
mdo added 7 commits December 22, 2016 23:43
- Set an explicit `display: flex` on the base `.nav` class and remove the floats/clearfixes from our navs.

- Set some global styles for `.nav-link`, a departure from the previous solution that featured no predefined padding.

- Move `.nav-link` from `inline-block` to `block` given this setting was added for our tabs and pills anyway.

- Remove horizontal margin from nav tabs; let folks set that on their own from now on.
Given move to flexbox, we can make this available for everyone and clean it up some.

- Simplifies the `.nav-justified` styles to build on the flex-powered `.nav` base class.

- Adds the `.nav-fill` to make nav links fill available horizontal space, but not equal width.
- Reorganize things, leading with the base nav first instead of an accessibility note, and then moving the rest to a new available styles section.

- Add horizontal alignment options thanks to new flex utils (these new utils will be documented later in another commit).

- Dropped `.nav-stacked` for a flex util and added additional alignment options, so document those, too.
- Adds new flexbox.md file to utilities docs

- Adds a `breakpoints.yml` data file for easier output of responsive classes in the docs. Will put this to use on other pages soon.

- Adds hella flex utils. There are some dupes for now, but they'll get removed in time.
@mdo mdo force-pushed the flex-hugs-not-bugs branch from 71b8a2f to 2e9c4f0 Compare December 23, 2016 19:49
@mdo
Copy link
Member Author

mdo commented Dec 23, 2016

Working on adding more flexbox utilities and documenting them well. This might be overly verbose, so please let me know if it's seeming a bit over the top. Each property will get a blurb and examples. Some will have tables, too.

screen shot 2016-12-23 at 11 48 08 am

For responsive versions, I've started by listing them all out like so. Too much? Just right?

screen shot 2016-12-23 at 11 48 13 am

@mdo
Copy link
Member Author

mdo commented Dec 23, 2016

Playing with it more, this feels a bit better and less repetitive.

screen shot 2016-12-23 at 11 55 23 am

mdo added 5 commits December 24, 2016 12:33
- better table of contents and overall structure

- clearer examples of modal contents, longer modals, and modal options
@mdo
Copy link
Member Author

mdo commented Dec 24, 2016

This branch is running away from me a bit, so going to call it as-is once this next build passes and then move on to another branch.

mdo added 2 commits December 24, 2016 14:09
…ne-block; clarifies follow-up text about use of the proper utilities
@mdo mdo merged commit 43ef8b1 into v4-dev Dec 24, 2016
@mdo mdo deleted the flex-hugs-not-bugs branch December 24, 2016 22:21
@mdo mdo mentioned this pull request Dec 24, 2016
@mdo
Copy link
Member Author

mdo commented Dec 24, 2016

Will tackle remaining todos in separate PRs, btw.

mdo added a commit that referenced this pull request Dec 25, 2016
fixes broken inline form example mentioned in #21407
@mdo mdo mentioned this pull request Dec 25, 2016
mdo added a commit that referenced this pull request Dec 25, 2016
fixes broken inline form example mentioned in #21407
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.

1 participant