Bootstrap: Focus styling of custom check/radio inconsistent based on validation method

Created on 2 Dec 2018  路  1Comment  路  Source: twbs/bootstrap

When using native browser validation, and the .was-validated class, the focused radio/checkbox indicator fill is correctly colored:

<div class="was-validated">
  <div class="custom-control custom-radio">
    <input type="radio" class="custom-control-input" id="customControlValidation2" name="radio-stacked" required>
    <label class="custom-control-label" for="customControlValidation2">Toggle this custom radio</label>
  </div>
  <div class="custom-control custom-radio mb-3">
    <input type="radio" class="custom-control-input" id="customControlValidation3" name="radio-stacked" required>
    <label class="custom-control-label" for="customControlValidation3">Or toggle this other custom radio</label>
  </div>
</div>

image

But if using the is-invalid or is-valid classes on the input, the focused indicator has the default "blue" background fill:

<div>
  <div class="custom-control custom-radio">
    <input type="radio" class="custom-control-input is-valid" id="customControlValidation2" name="radio-stacked">
    <label class="custom-control-label" for="customControlValidation2">Toggle this custom radio</label>
  </div>
  <div class="custom-control custom-radio mb-3">
    <input type="radio" class="custom-control-input is-valid" id="customControlValidation3" name="radio-stacked">
    <label class="custom-control-label" for="customControlValidation3">Or toggle this other custom radio</label>
  </div>
</div>

image

This issue happens on both custom-radio and custom-checkbox.

Expected behaviour: Both validation methods provide the same focus styling for the indicator (fill should match validation state).

(Using 4.1.3 CSS, on Chrome 60.0.3112.101)

css v4

Most helpful comment

This was fixed with the re-theming by @MartijnCuppens that will be shipping with v4.2: https://codepen.io/anon/pen/QzEdVE.

(Took me far too long to realize that lol).

>All comments

This was fixed with the re-theming by @MartijnCuppens that will be shipping with v4.2: https://codepen.io/anon/pen/QzEdVE.

(Took me far too long to realize that lol).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leomao10 picture leomao10  路  3Comments

athimannil picture athimannil  路  3Comments

eddywashere picture eddywashere  路  3Comments

ziyi2 picture ziyi2  路  3Comments

alvarotrigo picture alvarotrigo  路  3Comments