mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-02 16:04:07 +03:00
Improves forms migration guide, docs, and scss (#24348)
* fixes migration forms guides * removes container from Horizontal form * adds col-form-label sizes on form docs * removes .form-control-label from forms.scss * add note to migration
This commit is contained in:
committed by
Mark Otto
parent
217d344fa8
commit
008e0b5b68
@@ -18,6 +18,7 @@ While in beta, we aim to have no breaking changes. However, things don't always
|
||||
- Responsive tables now generate classes for each grid breakpoint. This breaks from Beta 1 in that the `.table-responsive` you've been using is more like `.table-responsive-md`. You may now use `.table-responsive` or `.table-responsive-{sm,md,lg,xl}` as needed.
|
||||
- Dropped Bower support as the package manager has been deprecated for alternatives (e.g., Yarn or npm). [See bower/bower#2298](https://github.com/bower/bower/issues/2298) for details.
|
||||
- Bootstrap now requires jQuery 3.0.0 or higher.
|
||||
- Removed the unused `.form-control-label` class. If you did make use of this class, it was duplicate of the `.col-form-label` class that vertically centered a `<label>` with it's associated input in horizontal form layouts.
|
||||
- Changed the `color-yiq` from a mixin that included the `color` property to a function that returns a value, allowing you to use it for any CSS property. For example, instead of `color-yiq(#000)`, you'd write `color: color-yiq(#000);`.
|
||||
|
||||
### Highlights
|
||||
@@ -110,7 +111,7 @@ New to Bootstrap 4 is the [Reboot]({{ site.baseurl }}/docs/{{ site.docs_version
|
||||
### Forms
|
||||
|
||||
- Moved element resets to the `_reboot.scss` file.
|
||||
- Renamed `.control-label` to `.form-control-label`.
|
||||
- Renamed `.control-label` to `.col-form-label`.
|
||||
- Renamed `.input-lg` and `.input-sm` to `.form-control-lg` and `.form-control-sm`, respectively.
|
||||
- Dropped `.form-group-*` classes for simplicity's sake. Use `.form-control-*` classes instead now.
|
||||
- Dropped `.help-block` and replaced it with `.form-text` for block-level help text. For inline help text and other flexible options, use utility classes like `.text-muted`.
|
||||
@@ -119,7 +120,7 @@ New to Bootstrap 4 is the [Reboot]({{ site.baseurl }}/docs/{{ site.docs_version
|
||||
- Horizontal forms overhauled:
|
||||
- Dropped the `.form-horizontal` class requirement.
|
||||
- `.form-group` no longer applies styles from the `.row` via mixin, so `.row` is now required for horizontal grid layouts (e.g., `<div class="form-group row">`).
|
||||
- Added new `.form-control-label` class to vertically center labels with `.form-control`s.
|
||||
- Added new `.col-form-label` class to vertically center labels with `.form-control`s.
|
||||
- Added new `.form-row` for compact form layouts with the grid classes (swap your `.row` for a `.form-row` and go).
|
||||
- Added custom forms support (for checkboxes, radios, selects, and file inputs).
|
||||
- Replaced `.has-error`, `.has-warning`, and `.has-success` classes with HTML5 form validation via CSS's `:invalid` and `:valid` pseudo-classes.
|
||||
|
||||
Reference in New Issue
Block a user