0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Commit Graph

1310 Commits

Author SHA1 Message Date
Mark Otto
7aa2a52069 Redo button states
Trying to simplify our output here by revamping these selectors. We overcomplicated things by setting hover styles for nearly every state (disabled and active included), and we set them in the wrong order.

This commit does the following:

- Reorders states so disabled comes before active, thereby removing the need to set disabled-active styles.

- Removes all focus and hover styles from disabled states as those will naturally inherit from the default button state.

- Renamed `.open` to `.show` to fix dropdown toggle highlighting.

- Tweaked some indendation in the Sass.
2016-12-28 15:12:04 -08:00
Mark Otto
150625265b fixes #21415 by moving disabled .btn-link color to the default state 2016-12-28 15:12:04 -08:00
Quy
d02b558a5a Rip number 2016-12-28 12:56:15 -08:00
Mark Otto
d2479cf5f0 inline-flex and width: 100% for stacked/vertical variation
shoutout to @Starsam80 for the fix
2016-12-27 22:37:50 -08:00
Mark Otto
5d0ec572d4 auto size input groups, fixes #20506 2016-12-27 22:37:50 -08:00
Mark Otto
4d141cb3d1 remove commented out code 2016-12-27 22:37:50 -08:00
Mark Otto
a849fa949b linting 2016-12-27 22:37:50 -08:00
Mark Otto
fd75c41279 revamp button group with flexbox 2016-12-27 22:37:50 -08:00
Mark Otto
c14ba036c6 forgot to add display flex to the navbar, so utils weren't applying 2016-12-27 22:37:09 -08:00
Mark Otto
8a3d0d344b use var 2016-12-27 14:17:11 -08:00
Mark Otto
8721ff8d6b fix inline checks 2016-12-27 14:17:11 -08:00
Mark Otto
4ba5bfb7cb add some vars 2016-12-27 14:17:11 -08:00
Mark Otto
fe0573cdab sure we only need the two mixins, but this ensures folks don't run into missing mixin errors down the line 2016-12-27 14:16:25 -08:00
Mark Otto
0f18dfc05c Update bootstrap-grid.scss 2016-12-27 14:16:25 -08:00
Mark Otto
424f969d1c Update bootstrap-reboot.scss 2016-12-27 14:16:25 -08:00
Mark Otto
4482503237 move custom down so folks can reassign var values and use other vars 2016-12-27 14:16:25 -08:00
Starsam80
31ac81e5ba Add more flex utilities 2016-12-26 13:06:53 -08:00
Quy
88a6b1c3d4 Rename tags to badges in comments 2016-12-26 13:06:34 -08:00
Mark Otto
8c90008098 Fixes #20586
Use pixels instead of rem units for focus box-shadow on custom controls so that IE11, Edge, and Win FF screw it up less
2016-12-25 15:48:44 -08:00
Mark Otto
96986bb4a3 Use calc() on .col-form-label padding calculations
Fixes #21135.

There's a height mismatch here because we're setting padding on the labels, while inputs get padding *and* a top+bottom border. This now uses calc to determine the exact height needed to match labels to inputs.
2016-12-25 15:48:44 -08:00
Mark Otto
04d48ba504 Replaces #21270 with proper fix
Rather than overriding this just on inline form examples, this should be for all static form controls to match inputs.
2016-12-25 15:48:44 -08:00
Mark Otto
4cd426963b vertically center .form-group contents in inline forms
fixes broken inline form example mentioned in #21407
2016-12-25 15:48:44 -08:00
Mark Otto
30fd1590d3 use flex and direction to do the stacked controls instead of float hacks
This also fixes #21280. Previously, we were using float and clear on the individual controls, but that meant a computer height of `0` for the parent `.custom-controls-stacked`. No more problem after using flexbox though.
2016-12-25 15:48:44 -08:00
Mark Otto
82061b25c4 move custom checks/radios to inline-flex 2016-12-25 15:48:44 -08:00
Starsam80
c2e5eb1542 Use variables for the width/height classes 2016-12-25 15:32:34 -08:00
Starsam80
210050d9c9 Clean up _spacing.scss a little bit 2016-12-25 15:32:34 -08:00
Starsam80
7fdedbd5e6 Remove some leftover IE9/flex stuff 2016-12-25 15:32:34 -08:00
Mark Otto
7d05c222f8 linting 2016-12-25 15:28:44 -08:00
Mark Otto
eb19def798 flex the footer and include some margin magic
- we need to set margin for space between footer buttons as flexbox doesn't render HTML spaces like inline-block does

- flexbox doesn't have collapsing margins or anything, so we hack it with some :not(:first-child) and :not(:last-child) action
2016-12-25 15:28:44 -08:00
Mark Otto
33746dc63e flex the modal header so we can remove custom styles
updates the dom order in our docs to match (floated content comes first, but no need for that in flexbox)
2016-12-25 15:28:44 -08:00
Mark Otto
e7f8ca08b0 No need to override a margin-top that never was set; only specify margin-bottom override 2016-12-25 15:28:44 -08:00
Mark Otto
31b9d93ffd Enable flex on the .modal-content, ensure .modal-body stretches the height (if needed) 2016-12-25 15:28:44 -08:00
Mark Otto
c214aa32d0 darker border on modal header 2016-12-25 15:28:44 -08:00
Mark Otto
103cae2333 trailing space 2016-12-25 14:03:50 -08:00
Mark Otto
dcd4a63e4e line break for sanity 2016-12-25 14:03:50 -08:00
Mark Otto
bab4f1ef3c add my-auto and m-auto 2016-12-25 14:03:50 -08:00
Mark Otto
4f85513608 responsive auto margin classes 2016-12-25 14:03:50 -08:00
Mark Otto
43c206d6ff add mr-auto and ml-auto for some flex shiz 2016-12-25 14:03:50 -08:00
Mark Otto
56c63aa6b8 Fixes #18228: Don't use transparent for bottom border, use bg color 2016-12-25 00:57:17 -08:00
Mark Otto
d5784d811b rip numbers 2016-12-24 14:21:04 -08:00
Quy
78ee9f3c3e Update toc numbering (#21422) 2016-12-24 14:21:04 -08:00
Mark Otto
991f2468d0 remove unused media vars, update numbers (oof) /cc @Quy 2016-12-24 14:21:04 -08:00
Mark Otto
d93991b1c5 remove unused utils, comment 2016-12-24 14:21:04 -08:00
Mark Otto
9d13fd3fe3 remove old flex utils, update docs to match 2016-12-24 14:21:04 -08:00
Mark Otto
574c3119f3 duplicate of the .flex-fill util 2016-12-24 14:21:04 -08:00
Mark Otto
5464f4ab7e Start to blow out and document more flexbox utilities
- 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.
2016-12-24 14:21:04 -08:00
Mark Otto
e4933c72da fix incorrect class name for inline-flex 2016-12-24 14:21:04 -08:00
Mark Otto
d9baeeb0af Change up the "justified" nav options
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.
2016-12-24 14:21:04 -08:00
Mark Otto
699d8a5a80 Make .nav flex-powered
- 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.
2016-12-24 14:21:04 -08:00
Mark Otto
66c87cb7ca Undo #21171 (which closed #20977)
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.
2016-12-24 14:21:04 -08:00
Mark Otto
95ee9aa94c small unrelated addition—adds .d-flex-inline util 2016-12-22 21:29:48 -08:00
Mark Otto
b5c50d4aff reduce .media styles to their bare minimum
Sets minimum required flex styles (including an explicit starting alignment) and removes everything else.

- no need for .media-left and .media-right, we have padding utils
- no need for a .media-heading, we have margin
- no need for .media-object, we have display utils
- no need for .media-list, we have .list-unstyled util
2016-12-22 21:29:48 -08:00
Quy
615072e4c9 Rename Tags to Badges in comments 2016-12-22 21:28:43 -08:00
Mark Otto
94bd6b76be Merge branch 'flex-cards' into v4-dev 2016-12-22 21:27:54 -08:00
Jacob Müller
1712484727 Add color variables for white and black (#21397)
* Add color variables for white and black

Closes #21395.
2016-12-22 19:09:11 -08:00
Mark Otto
040acd30db change card deck margin strategy
- Instead of negative left/right margins, we selectively apply margins to the cards as needed. This way the first and last child never receive a left and right margin (respectively), so we don't need to negative indent those at the .card-deck level.

- Drops the margin-bottom override on the .card because there's no more default margin there.

- Drop the margin-bottom from the .card-deck to match our lack of margins on the card.

This and the previous commit fixes #19883.
2016-12-22 18:59:05 -08:00
Mark Otto
b3d8426ffe move to grid gutter width, fixes #21300 2016-12-22 18:55:21 -08:00
Mark Otto
754698c4d7 New width and height utils
Adding 25%, 50%, and 75% to the mix for later use with cards
2016-12-22 17:15:10 -08:00
Mark Otto
5d592d16db switch from block to flex
add flex direction too
2016-12-22 16:41:28 -08:00
Mark Otto
050716903f remove default bottom margin on cards
use utils instead
2016-12-22 16:41:11 -08:00
Mark Otto
8d3b40211b move the card-block flex action up to all card-blocks
this allows us to easily scale card blocks in groups and decks, without repeating it in our css
2016-12-22 16:40:58 -08:00
Mark Otto
390a2a6c60 remove commented out code 2016-12-22 16:40:19 -08:00
Mark Otto
0873fccd63 comment typo 2016-12-22 16:39:23 -08:00
Mark Otto
2c48655d07 fix comment 2016-12-22 16:39:18 -08:00
Mark Otto
cd2584870e add card column margin variable instead of relying on a default card margin
this assumes no margin on the .card to start (which will follow in a later commit)
2016-12-22 16:39:11 -08:00
Mark Otto
246151aa12 add card column count variable 2016-12-22 16:38:22 -08:00
Mark Otto
5f40770d19 Rename card column gap variable 2016-12-22 16:38:09 -08:00
Mark Otto
d4217ea137 New width and height utils
Adding 25%, 50%, and 75% to the mix for later use with cards
2016-12-22 16:37:18 -08:00
Mark Otto
736be8fca6 linting 2016-12-22 14:58:40 -08:00
Mark Otto
135b65ded4 text-align doesn't apply here, so we can nuke it 2016-12-22 14:58:40 -08:00
Mark Otto
be7a8c68f7 Redo controls in flexbox
- Drops the absolute positioning of the icons within the left/right controls. We have to keep the controls themselves positioned though since we're overlapping HTML elements here.

- No more position, left, right, or margins involved; just some justify-content and align-items.

- Add some comments for explaining which flex property-value pair does what.

- Remove the unapplied font and line-height stuff now that we're all SVGs and flexbox here.
2016-12-22 14:58:40 -08:00
Mark Otto
1706f494f0 flexbox powered indicators
This revamps the indicators to use flexbox instead of inline-block for added flexbility (hah). Indicators now automatically scale based on the number of elements present, and max out at the `$carousel-indicator-width` instead of always being that wide.
2016-12-22 14:58:40 -08:00
Mark Otto
d426c3c50e start small--set flex instead of block for active items 2016-12-22 14:58:40 -08:00
Mark Otto
8231b188c3 remove .hidden-* classes from .navbar-toggler and make that part of the .navbar-toggleable-* 2016-12-22 13:48:07 -08:00
Mark Otto
b71f973bb5 more linting 2016-12-22 13:48:07 -08:00
Mark Otto
0698dfbed7 linting 2016-12-22 13:48:07 -08:00
Mark Otto
8d9d84784a Redo navbar-toggler
- 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
2016-12-22 13:48:07 -08:00
Mark Otto
80674b0c58 fixes #18115: move forward with one naming scheme for inversed color schemes, renaming .navbar-dark to .navbar-inverse (matching .card-inverse in the process and restoring v3's inverted class name) 2016-12-22 13:48:07 -08:00
Mark Otto
ecba56828d fixes #18053 by removing container padding at lower breakpoints on responsive navbars 2016-12-22 13:48:07 -08:00
Mark Otto
2ea7feb9cc remove 2016-12-22 13:48:07 -08:00
Mark Otto
08e1582f2d Fix vertical alignment a bit 2016-12-22 13:48:07 -08:00
Mark Otto
5432e7621c move all nav link and collapse and container behaviors to the toggleable class generation area; this way the .navbar-toggleable-* goes on .navbar, easily affecting everything that needs updating for each breakpoint's use 2016-12-22 13:48:07 -08:00
Mark Otto
73da266009 move flex to navbar container only; otherwise it affects things negatively elsewhere 2016-12-22 13:48:07 -08:00
Mark Otto
135bd0283d containers should flex 2016-12-22 13:48:07 -08:00
Mark Otto
96346f0b44 flexbox shiz 2016-12-22 13:48:07 -08:00
Mark Otto
b98ef3bfd0 no need for a clearfix given no more floats 2016-12-22 13:48:07 -08:00
Mark Otto
350f8a20c9 move padding on nav links and brand to be responsive padding, keeping mobile contents aligned better 2016-12-22 13:48:07 -08:00
Mark Otto
819978cb71 remove width 100% from positioning, remove rounded corners for utils 2016-12-22 13:48:07 -08:00
Mark Otto
96082b1ec7 remove justified, replacing with modifier later if needed; combine rules 2016-12-22 13:48:07 -08:00
Mark Otto
18453f06f9 flexbox this thing
- 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
2016-12-22 13:48:07 -08:00
Mark Otto
09f13c4764 indentation 2016-12-22 13:48:07 -08:00
Mark Otto
99ac0bcedc exploring table based navbar again 2016-12-22 13:48:07 -08:00
Bardi Harborow
855a67b1d6 Remove IE9 browser hacks. (#21393) 2016-12-22 13:41:31 -08:00
Patrick Cameron
b01f5a1a38 Changed a word in a comment (#21399) 2016-12-22 13:25:41 -08:00
Mark Otto
a2b2f99e3b Restyle code elements in links (#21392)
* Restyle code elements in links

Fixes #21259. Removes the background, color, and padding on code elements within anchors.

* Update _code.scss
2016-12-21 20:28:34 -08:00
Mark Otto
eb2e1102be Flexbox all the time (Drop IE9 support and remove $enable-flex option) (#21389)
* remove the $enable-flex variable option

* remove bootstrap-flex.css dist file and it's grunt task

* remove the separate flex css file for docs; it's all the same now

* remove flexbox docs (porting some to the main grid docs in next commit)

* clean up few grid docs bits to simplify copy, start to mention flexbox

* port relevant flexbox-grid.md content to grid.md

- clean up mixins
- update how it works section
- bring over sizing and alignment sections

* remove the $enable-flex from the options.md page

* update lead paragraph to mention flexbox

* update migration to mention loss of ie9 support

* remove mention of flexbox dist file

* clarify IE support

* making a note

* remove flexbox variant mentions from component docs

- updates docs for media object, navs, list group, and cards to consolidate docs
- no more need to callout flexbox variants since it's now the default

* remove $enable-flex if/else from sass files

* remove flex dist files

* update scss lint property order to account for flex properties

* linting

* change to numberless classes for autosizing, wrap in highlighting div

* bump gruntfile and postcss to ie10

* redo intro sections

* rearrange

* phew, redo hella grid docs

- rearrange all the things
- consolidate some bits

* remove reference to flexbox mode

* more border action for demo

* Make some changes to the .card's in .card-deck's to ensure footers align to the bottom
2016-12-21 20:26:17 -08:00
Mark Otto
f464a5b214 Redo color vars
This pulls in some changes from #18462 to include a set of generic color variables. It doesn't include a Sass map for generating the theme colors yet, since we can't easily do that for all components, but does give a few more color choices to folks and an easier way to customize.
2016-12-20 23:24:24 -08:00
Gijs Boddeus
1c2f372aad Overwrite margin-bottom on form-control-static (#21270)
* Overwrite margin-bottom on form-control-static

In the documentation the form-control-static class has been used on a p element.
On the regular vertical form the margin bottom of the p element gets overwritten by a mb-0 class.
In the inline form example this class hasn't been applied, therefore the p element gets a margin-bottom.

To prevent this behavior we can add a margin-bottom of 0.

* Update _forms.scss
2016-12-20 14:45:08 -08:00
Mark Otto
37de11e386 Rename -bg-inverse to -inverse-bg; add -inverse-color (#21371) 2016-12-19 21:50:31 -08:00
Mark Otto
8eeb71c91c Merge branch 'fix-20982' of https://github.com/Starsam80/bootstrap into Starsam80-fix-20982 2016-12-19 21:44:03 -08:00