Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork79.2k
Simplify input groups by dropping.input-group-prepend
and.input-group-append
#29885
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 ourterms of service andprivacy 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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
alecpl commentedDec 20, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 theinput 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 inthis netlify: That should be rounded. And cases that have multiple dropdown menus: |
ff247c2
tocd0b3ac
CompareJust fixed that. |
The 2nd issue (multiple active states with multiple dropdowns) still seems to occur. |
8c82e88
to137a7fd
Compareysds commentedFeb 10, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The CSS side LGTM.@XhmikosR Could you see the JS side? |
Please reviewhttps://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
to02838f6
CompareThis 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
to267ae2a
Compare267ae2a
toeaeffa1
Compare
Uh oh!
There was an error while loading.Please reload this page.
_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/
Alsocloses#30111,closes#30104
Seehttps://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: