Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update bootstrap dependency to 5.0.0.beta2 * .custom-* styles merged in to native ones * Use map-merge to add custom colors to theme * Update header markup * Breadcrumbs have no padding now * data-toggle and data-target get 'bs-' prefix * data-placement gets 'bs-' prefix; drop data-trigger * Drop top margin; update horizontal margin * Rework stack/split button group * Hide toggle buttons below medium breakpoint * data-dismiss gets 'bs-' prefix on modal * Use bootstrap's close button on modal * .form-text now subsumes <small> and .text-muted * Drop .form-group-{invalid,valid} They aren't used by bootstrap and .form-group has gone in v5 as well. * verticals: .form-group -> .mb-3 * verticals: labels need .form-label * verticals: .form-control-file -> .form-control * verticals: .form-control -> .form-select Also add :vertical_select wrapper for `<select>` lists used for associations. Without this, the select elements would use the default :vertical_form wrapper and get the .form-control class. * verticals: .form-control-range -> .form-range * verticals: address layout issue with boolean When a boolean is rendered as radio buttons a hidden `<input>` element is added between the `<legend>` and first `<div>` wrapping a radio button. Bootstrap's styling floats the legend left and needs the following element to be cleared, but this does not work if the following element is not displayed. We add an additional rule to target the first following wrapper `<div>`. * Rework event handling for stack/split toggle .active has gone; check for .btn so we only process events from the input elements, not the labels. Don't preventDefault() on the event, so the radio button will toggle. * Get stack/split state from radio buttons * horizontals: .form-group -> .mb-3 * horizontals: .form-control-file -> .form-control * horizontals: .form-control -> .form-select As for horizontals, add :horizontal_select wrapper for `<select>` lists used for associations. Without this, the select elements would use the default :horizontal_form wrapper and get the .form-control class. * horizontals: .form-control-range -> .form-range * horizontals: better range label/input alignment * horizontals: remove duplicate label on boolean * horizontals: fix margin at bottom of form * inlines: .sr-only -> .visually-hidden * inlines: .form-inline replaced with grid * .custom-* form styles have been dropped * input_groups: .form-group -> .mb-3 * input_groups: labels need .form-label * input_groups: prepend/append wrapper div dropped * input_groups: fix password js Needs updating as .input-group-append wrapper div isn't used any more. * floating_labels: built in with v5 * floating_labels: remove `<select multiple>` example Not supported by Bootstrap 5's floating labels implementation. * floating_labels: .custom-select -> .form-select * floating_labels: docs recommend against rows="" * input_groups: add .has-validation, move feedback New .has-validation class was added so validation feedback can move inside input-group. This works ok for simple_form, but the plain HTML version with both .valid-feedback and .invalid-feedback divs loses the rounded end on the input group. See twbs/bootstrap#25110 * remove .d-block where it is not needed * fix inclusion of stylesheets in documentation * Update version number on home page * Replace .media and .media-body * `div` is the default for `tag` in wrappers * Update bootstrap dependency to 5.0.0 * Add `offcanvas` to `application.scss` * Bump bootstrap rubygem to v5.0.1 Co-authored-by: m5o <m5o@gmx.com>
- Loading branch information
Showing
47 changed files
with
564 additions
and
1,460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 0 additions & 106 deletions
106
app/assets/stylesheets/simple_form-bootstrap/_form_floating_labels.scss
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
app/assets/stylesheets/simple_form-bootstrap/_form_legend_clear.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// In bootstrap 5 legend floats left and requires the following element | ||
// to be cleared. In a radio button or checkbox group the element after | ||
// the legend will be the automatically generated hidden input; the fix | ||
// in https://github.com/twbs/bootstrap/pull/30345 applies to the hidden | ||
// input and has no visual effect. Here we try to fix matters by | ||
// applying the clear to the div wrapping the first following radio button | ||
// or checkbox. | ||
legend ~ div.form-check:first-of-type { | ||
clear: left; | ||
} |
11 changes: 1 addition & 10 deletions
11
app/assets/stylesheets/simple_form-bootstrap/_form_multi_select.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
.custom-select, | ||
.form-control { | ||
.form-select { | ||
&.date, | ||
&.datetime, | ||
&.time { | ||
&:first-of-type { margin-left: 0 !important; } | ||
&:last-of-type { margin-right: 0 !important; } | ||
} | ||
} | ||
|
||
.custom-select { | ||
&[multiple], | ||
&:only-child { | ||
margin-left: 0 !important; | ||
margin-right: 0 !important; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
app/assets/stylesheets/simple_form-bootstrap/_simple_form-bootstrap.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import "form_abbr"; | ||
@import "form_button"; | ||
@import "form_collection_label"; | ||
@import "form_floating_labels"; | ||
@import "form_legend_clear"; | ||
@import "form_multi_select"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.