You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improves forms migration guide, docs, and scss (twbs#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
Copy file name to clipboardExpand all lines: docs/4.0/components/forms.md
+70-45Lines changed: 70 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,62 +365,87 @@ Create horizontal forms with the grid by adding the `.row` class to form groups
365
365
Be sure to add `.col-form-label` to your `<label>`s as well so they're vertically centered with their associated form controls. For `<legend>` elements, you can use `.col-form-legend` to make them appear similar to regular `<label>` elements.
Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`.
Copy file name to clipboardExpand all lines: docs/4.0/migration.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ While in beta, we aim to have no breaking changes. However, things don't always
18
18
- 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.
19
19
- 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.
20
20
- Bootstrap now requires jQuery 3.0.0 or higher.
21
+
- 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.
21
22
- 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);`.
22
23
23
24
### Highlights
@@ -110,7 +111,7 @@ New to Bootstrap 4 is the [Reboot]({{ site.baseurl }}/docs/{{ site.docs_version
110
111
### Forms
111
112
112
113
- Moved element resets to the `_reboot.scss` file.
113
-
- Renamed `.control-label` to `.form-control-label`.
114
+
- Renamed `.control-label` to `.col-form-label`.
114
115
- Renamed `.input-lg` and `.input-sm` to `.form-control-lg` and `.form-control-sm`, respectively.
115
116
- Dropped `.form-group-*` classes for simplicity's sake. Use `.form-control-*` classes instead now.
116
117
- 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
119
120
- Horizontal forms overhauled:
120
121
- Dropped the `.form-horizontal` class requirement.
121
122
-`.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">`).
122
-
- Added new `.form-control-label` class to vertically center labels with `.form-control`s.
123
+
- Added new `.col-form-label` class to vertically center labels with `.form-control`s.
123
124
- Added new `.form-row` for compact form layouts with the grid classes (swap your `.row` for a `.form-row` and go).
124
125
- Added custom forms support (for checkboxes, radios, selects, and file inputs).
125
126
- Replaced `.has-error`, `.has-warning`, and `.has-success` classes with HTML5 form validation via CSS's `:invalid` and `:valid` pseudo-classes.
0 commit comments