question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix border-radius of form-control within input-group-append/input-group-prepend

See original GitHub issue

The border-radius is wrong when form-control is inside the input-group-append or input-group-prepend:

<div class="input-group">
  <input type="text" class="form-control">
  <div class="input-group-append">
    <select class="form-control">
      <option>years ago</option>
      <option>months ago</option>
      <option>weeks ago</option>
      <option>days ago</option>
    </select>
  </div>
</div>

result: image

I think this should be added to _input-group.scss:

.input-group > .input-group-prepend > .form-control,
.input-group > .input-group-append:not(:last-child) > .form-control {
    @include border-right-radius(0);
}

.input-group > .input-group-append > .form-control,
.input-group > .input-group-prepend:not(:first-child) > .form-control {
  @include border-left-radius(0);
}

result: image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mdocommented, Jan 24, 2018

The statement stands; that’s not what those classes are intended to do, and we won’t explicitly support that behavior. You can, however, set width: auto (or soon, .w-auto) on elements to reset this. The required HTML and CSS for these component is super tricky, it does limit what we can do.

0reactions
hafezdcommented, Jan 24, 2018

@mdo It doesn’t work with width: auto but works with flex: 0 0 auto; width:auto. I think we should wait for w-auto.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap form input edges wont change from rounded to square
It seems like a specificity issue, modifying .form-group-sm .form-control { } removes the border radius. Share.
Read more >
bootstrap.min.css | Drupal 9.1.x
Same filename and directory in other branches ... -height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-control.is-invalid ...
Read more >
Homepage - RPubs
... -height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + ... :0}.input-group-append,.input-group-prepend{display:-ms-flexbox ...
Read more >
GO! achieves environmental management certification
... ;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + ... }.input-group-append,.input-group-prepend{display:flex}.input-group-append ...
Read more >
Blog: Counselor's Corner - Vineland Elementary School
Posted by kamara.johnson On 30 March, 2016 at 1:35 PM 43 Comments ... border-radius: 10px;" alt="Shopper Award" width="120" height="60" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found