Skip to content

Custom Checkboxes/Radios Do Not Display Correct Color on :focus For Validation #24173

Closed

Description

@Joyrex

In the documentation: https://getbootstrap.com/docs/4.0/components/forms/#supported-elements

Tab or via dev tools set :focus on custom radio or checkbox and outlined focus state is default color instead of the appropriate validation state color.
image
Also, should the appended and prepended elements (like the Browse button on the custom file input) show the proper validation state colors? Seems a bit off having only the input part of the element styled.

Activity

  1. Joyrex commented on Sep 29, 2017

    @Joyrex
    Author

    Anyone looking for a quick fix, here's the CSS required to style these correctly:
    .custom-control-input.is-invalid~.custom-control-indicator, .was-validated .custom-control-input:invalid~.custom-control-indicator { box-shadow: 0 0 0 1px #fff, 0 0 0 3px #dc3545; }
    This is only for the invalid state.

  2. added
    cssSass sources or compiled CSS
    v4v4, the frozen docs on gh-pages
    on Sep 30, 2017
  3. added
    has-prAn open pull request addresses it
    on Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cssSass sources or compiled CSShas-prAn open pull request addresses itv4v4, the frozen docs on gh-pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions