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

Bootstrap 5.3: Deprecated the .text-muted utility and $text-muted Sas… #730

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OLD-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ This generates:
<div class="form-group">
<label for="user_password">Password</label>
<input class="form-control" type="password" name="user[password]" />
<small class="form-text text-muted">A good password should be at least six characters long</small>
<small class="form-text text-body-secondary">A good password should be at least six characters long</small>
</div>
<div class="form-check">
<input name="user[remember_me]" type="hidden" value="0">
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ This generates:
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
<input class="form-control" id="user_password" name="user[password]" type="password">
<small class="form-text text-muted">A good password should be at least six characters long</small>
<small class="form-text text-body-secondary">A good password should be at least six characters long</small>
</div>
<div class="form-check mb-3">
<input autocomplete="off" name="user[remember_me]" type="hidden" value="0">
Expand Down Expand Up @@ -368,7 +368,7 @@ This generates:
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
<input class="form-control" id="user_password" name="user[password]" type="password">
<small class="form-text text-muted">Must be at least 6 characters long</small>
<small class="form-text text-body-secondary">Must be at least 6 characters long</small>
</div>
```

Expand Down Expand Up @@ -607,7 +607,7 @@ This generates:
<input class="form-check-input" id="user_skill_level_2" name="user[skill_level]" type="radio" value="2">
<label class="form-check-label" for="user_skill_level_2">Advanced</label>
</div>
<small class="form-text text-muted">Optional Help Text</small>
<small class="form-text text-body-secondary">Optional Help Text</small>
</div>
<div class="mb-3">
<div class="form-check mb-3">
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap_form/components/hints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Hints
def generate_help(name, help_text)
return if help_text == false

help_klass ||= "form-text text-muted"
help_klass ||= "form-text text-body-secondary"
help_text ||= get_help_text_by_i18n_key(name)
help_tag ||= :small

Expand Down
2 changes: 1 addition & 1 deletion test/bootstrap_checkbox_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class BootstrapCheckboxTest < ActionView::TestCase
<input class="form-check-input" id="user_misc_1" name="user[misc][]" type="checkbox" value="1" />
<label class="form-check-label" for="user_misc_1">Foobar</label>
</div>
<small class="form-text text-muted">With a help!</small>
<small class="form-text text-body-secondary">With a help!</small>
</div>
HTML

Expand Down
2 changes: 1 addition & 1 deletion test/bootstrap_fields_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class BootstrapFieldsTest < ActionView::TestCase
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
<input class="form-control" id="user_password" name="user[password]" type="password" />
<small class="form-text text-muted">A good password should be at least six characters long</small>
<small class="form-text text-body-secondary">A good password should be at least six characters long</small>
</div>
HTML
assert_equivalent_html expected, @builder.password_field(:password)
Expand Down
10 changes: 5 additions & 5 deletions test/bootstrap_form_group_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input required="required" class="form-control" id="user_email" name="user[email]" type="text" value="[email protected]" />
<small class="form-text text-muted">This is required</small>
<small class="form-text text-body-secondary">This is required</small>
</div>
HTML
assert_equivalent_html expected, @builder.text_field(:email, help: "This is required")
Expand All @@ -213,7 +213,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
<label class="col-form-label col-sm-2 required" for="user_email">Email</label>
<div class="col-sm-10">
<input required="required" class="form-control" id="user_email" name="user[email]" type="text" value="[email protected]" />
<small class="form-text text-muted">This is required</small>
<small class="form-text text-body-secondary">This is required</small>
</div>
</div>
HTML
Expand All @@ -225,7 +225,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
<input class="form-control" id="user_password" name="user[password]" type="text" value="secret" />
<small class="form-text text-muted">A good password should be at least six characters long</small>
<small class="form-text text-body-secondary">A good password should be at least six characters long</small>
</div>
HTML
assert_equivalent_html expected, @builder.text_field(:password)
Expand All @@ -246,7 +246,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
<input class="form-control" id="user_password" name="user[password]" type="text" value="secret" />
<small class="form-text text-muted">A <strong>good</strong> password should be at least six characters long</small>
<small class="form-text text-body-secondary">A <strong>good</strong> password should be at least six characters long</small>
</div>
HTML
assert_equivalent_html expected, @builder.text_field(:password)
Expand Down Expand Up @@ -488,7 +488,7 @@ class BootstrapFormGroupTest < ActionView::TestCase
<label class="form-label required" for="user_email">Email</label>
<input required="required" class="form-control is-invalid" id="user_email" name="user[email]" type="text" />
<div class="invalid-feedback">can't be blank, is too short (minimum is 5 characters)</div>
<small class="form-text text-muted">This is required</small>
<small class="form-text text-body-secondary">This is required</small>
</div>
</form>
HTML
Expand Down
8 changes: 4 additions & 4 deletions test/bootstrap_form_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ def warn(message, ...)
<label class="form-label required" for="user_email">Email</label>
<input required="required" class="form-control is-invalid" id="user_email" name="user[email]" type="text" />
<div class="invalid-feedback">can't be blank, is too short (minimum is 5 characters)</div>
<small class="form-text text-muted">This is required</small>
<small class="form-text text-body-secondary">This is required</small>
</div>
</form>
HTML
Expand All @@ -764,7 +764,7 @@ def warn(message, ...)
<input required="required" class="form-control is-invalid" id="user_email" name="user[email]" type="text" />
</div>
<div class="invalid-feedback">can't be blank, is too short (minimum is 5 characters)</div>
<small class="form-text text-muted">This is required</small>
<small class="form-text text-body-secondary">This is required</small>
</div>
</form>
HTML
Expand All @@ -785,7 +785,7 @@ def warn(message, ...)
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input required="required" class="form-control is-invalid" id="user_email" name="user[email]" type="text" />
<small class="form-text text-muted">This is required</small>
<small class="form-text text-body-secondary">This is required</small>
</div>
</form>
HTML
Expand All @@ -805,7 +805,7 @@ def warn(message, ...)
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input required="required" class="form-control" id="user_email" name="user[email]" type="text" value="[email protected]" />
<small class="form-text text-muted">This is <strong>useful</strong> help</small>
<small class="form-text text-body-secondary">This is <strong>useful</strong> help</small>
</div>
</form>
HTML
Expand Down
10 changes: 5 additions & 5 deletions test/bootstrap_radio_button_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class BootstrapRadioButtonTest < ActionView::TestCase
Foobar
</label>
</div>
<small class="form-text text-muted">With a help!</small>
<small class="form-text text-body-secondary">With a help!</small>
</div>
HTML

Expand Down Expand Up @@ -253,7 +253,7 @@ class BootstrapRadioButtonTest < ActionView::TestCase
<input class="form-check-input" id="user_misc_1" name="user[misc]" type="radio" value="1" />
<label class="form-check-label" for="user_misc_1"> rabooF</label>
</div>
<small class="form-text text-muted">With a help!</small>
<small class="form-text text-body-secondary">With a help!</small>
</div>
HTML

Expand All @@ -271,7 +271,7 @@ class BootstrapRadioButtonTest < ActionView::TestCase
<input class="form-check-input" id="user_misc_address_1" name="user[misc]" type="radio" value="address_1" />
<label class="form-check-label" for="user_misc_address_1"> Foobar</label>
</div>
<small class="form-text text-muted">With a help!</small>
<small class="form-text text-body-secondary">With a help!</small>
</div>
HTML

Expand Down Expand Up @@ -328,7 +328,7 @@ class BootstrapRadioButtonTest < ActionView::TestCase
<input class="form-check-input" id="user_misc_1" name="user[misc]" type="radio" value="1" />
<label class="form-check-label" for="user_misc_1"> rabooF</label>
</div>
<small class="form-text text-muted">With a help!</small>
<small class="form-text text-body-secondary">With a help!</small>
</div>
HTML

Expand All @@ -346,7 +346,7 @@ class BootstrapRadioButtonTest < ActionView::TestCase
<input class="form-check-input" id="user_misc_address_1" name="user[misc]" type="radio" value="address_1" />
<label class="form-check-label" for="user_misc_address_1"> Foobar</label>
</div>
<small class="form-text text-muted">With a help!</small>
<small class="form-text text-body-secondary">With a help!</small>
</div>
HTML

Expand Down
2 changes: 1 addition & 1 deletion test/bootstrap_selects_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def options_range(start: 1, stop: 31, selected: nil, months: false)
<option value="1">activated</option>
<option value="2">blocked</option>
</select>
<small class="form-text text-muted">Help!</small>
<small class="form-text text-body-secondary">Help!</small>
</div>
HTML
assert_equivalent_html expected,
Expand Down
Loading