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

input-group + <input type=color> doesn't use whole height #39737

Closed
3 tasks done
ChrisHSandN opened this issue Mar 5, 2024 · 2 comments
Closed
3 tasks done

input-group + <input type=color> doesn't use whole height #39737

ChrisHSandN opened this issue Mar 5, 2024 · 2 comments

Comments

@ChrisHSandN
Copy link

Prerequisites

Describe the issue

An input-group combined with <input type="color"> does not style correctly and leaves a gap between the bottom of the input compared to the height of the input-group-text.

image

Reduced test cases

<div class="input-group mb-3">
  <span class="input-group-text">text</span>
  <input type="text" class="form-control">
</div>

<div class="input-group mb-3">
  <span class="input-group-text">color</span>
  <input type="color" class="form-control">
</div>

Testcase: https://jsfiddle.net/chris_h/k4cdfw2e/

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

v5.2.3

@louismaximepiton
Copy link
Member

Hey there,

I think you're not using it right here. The <input type="color"> is missing the class .form-control-color as mentioned here.
So the following code should work fine:

<div class="input-group mb-3">
  <span class="input-group-text">text</span>
  <input type="text" class="form-control">
</div>

<div class="input-group mb-3">
  <span class="input-group-text">color</span>
  <input type="color" class="form-control form-control-color">
</div>

I don't have any issue after that. Can you confirm ?

@ChrisHSandN
Copy link
Author

Ah my bad, I hadn't spotted the form-control-color class. Closing as that resolves the issue.

Many thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants