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

Different way are used to control overlap border of input-group-addon between input-group-btn #25005

Closed
ysds opened this issue Dec 14, 2017 · 1 comment

Comments

@ysds
Copy link
Member

ysds commented Dec 14, 2017

Regarding overlapping of borders of a grouped element, @mdo commented in #24453 that it is not good way to control the border color. As an alternative, we can use border-width: 0 or negative margin.

In input group, .input-group-addon uses border width to 0, and input-group-btn uses negative margin. I think we should use a same way (negative margin), since .input-group-addon and input-group-btn are similar in principle.

.form-control,
.custom-select,
.custom-file {
+ .input-group-addon:not(:first-child) {
border-left: 0;
}
}

// Negative margin for spacing, position for bringing hovered/focused/actived
// element above the siblings.
> .btn {
position: relative;
+ .btn {
margin-left: (-$input-border-width);
}

@ysds
Copy link
Member Author

ysds commented Dec 14, 2017

And, RIGHT SIDE .input-group-btn > .btn + .btn has double border;

https://jsfiddle.net/35n8yt2x/

You can reproduce this issue on the docs:
http://getbootstrap.com/docs/4.0/components/input-group/#segmented-buttons

.btn-secondary to .btn-outline-secondary:

image

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