Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #33204
Closed
Open
Issue created Feb 25, 2021 by Administrator@rootContributor

input-group validation wrong right border color

Created by: tkrotoff

Applies to Bootstrap 4.6.0 & 5.0.0-beta2.

Consider this 4.6.0 code:

<div class="input-group">
  <input class="form-control is-invalid">
  <div class="input-group-append">
    <button type="button" class="btn btn-outline-secondary">Button</button>
  </div>
</div>

https://codepen.io/tkrotoff/pen/rNWYbyJ?editors=1100

We get: Screen Shot 2021-02-25 at 20 11 43

Instead of: Screen Shot 2021-02-25 at 20 12 26

==> the input right border should be red instead of grey

The same happens with 5.0.0-alpha2: https://codepen.io/tkrotoff/pen/MWbrNpp?editors=1100

<div class="input-group">
  <input class="form-control is-invalid">
  <button type="button" class="btn btn-outline-secondary">Button</button>
</div>

Quick fix:

// 4.6.0
.input-group {
  .form-control.is-invalid,
  .custom-select.is-invalid {
    z-index: 3;
  }
}

// 5.0.0-beta2
.input-group {
  .form-control.is-invalid,
  .form-select.is-invalid {
    z-index: 3;
  }
}

FYI when focusing on the input, the right border is OK:

Screen Shot 2021-02-25 at 20 14 50

because of this code:

// Bring the "active" form control to the top of surrounding elements
> .form-control:focus,
> .form-select:focus {
  z-index: 3;
}

https://github.com/twbs/bootstrap/blob/v5.0.0-beta2/scss/forms/_input-group.scss#L20-L24

Assignee
Assign to
Time tracking