-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Simplify input groups by dropping .input-group-prepend
and .input-group-append
#29885
Simplify input groups by dropping .input-group-prepend
and .input-group-append
#29885
Conversation
Very nice. Thank you. |
Definitely like this, reduces the final CSS size too 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some use cases are no longer supported, are they intentional?
v4 supported use cases: #25352
@ysds, what use cases exactly? (I know the input group |
Ping @ysds |
Just so we are safe, did you check the examples too @MartijnCuppens? |
@XhmikosR, no appearances of |
@MartijnCuppens Please see dropdown menu's corner in this netlify: That should be rounded. And cases that have multiple dropdown menus: |
ff247c2
to
cd0b3ac
Compare
Just fixed that. |
The 2nd issue (multiple active states with multiple dropdowns) still seems to occur. |
8c82e88
to
137a7fd
Compare
The CSS side LGTM. @XhmikosR Could you see the JS side? |
Please review https://github.com/twbs/bootstrap/pull/30117/files first, it includes a fix and test for the |
Punted to Alpha 2 for now, but would happily see it back to first alpha if the JS errors get fixed. |
b64fd1e
to
02838f6
Compare
This fails in IE because of the matches polyfill:
|
@MartijnCuppens you can use our helper, or wait until #30377 lands :) |
The helper is used I guess. I don't really understand the reason why |
the JS looks good to me, nice work @MartijnCuppens 👍 |
429c63a
to
267ae2a
Compare
267ae2a
to
eaeffa1
Compare
_input-groups.scss
has become quite hard to maintain, mainly because of the nesting we have with.input-group-prepend
and.input-group-append
. It's actually pretty simple to remove this. This will also make our html look a lot simpler.Before:
After:
Demo: https://deploy-preview-29885--twbs-bootstrap.netlify.com/docs/4.3/forms/input-group/
Also closes #30111, closes #30104
See https://codepen.io/MartijnCuppens/pen/mdyZBoR
For the dropdown buttons some things needed to be changed in order to make this work because the
show
class was added to the (random) parent of the toggle button instead to the button itself. The way the dropdown menu is found is now changed.While I was working on this, I discovered a bug which is explained in #30117. Please review this first because that PR also includes a test.
I've also added an additional example to test multiple dropdowns in a input group: https://deploy-preview-29885--twbs-bootstrap.netlify.com/docs/4.3/forms/input-group/#buttons-with-dropdowns
To Do: