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

Segmented buttons double border #11431

Closed
IsaiahvH opened this issue Nov 9, 2013 · 9 comments
Closed

Segmented buttons double border #11431

IsaiahvH opened this issue Nov 9, 2013 · 9 comments
Labels
Milestone

Comments

@IsaiahvH
Copy link

IsaiahvH commented Nov 9, 2013

Hello,

(Even in the Bootstrap example), the segmented buttons (right of the input field) seem to have a double border between them.

I looked around a bit, and this can be fixed easily by applying margin-right: -1px; to the left button of the segmented buttons (which are right of the input field).

It's a small detail, but it does look better.

@zlatanvasovic
Copy link
Contributor

It isn't about margins and I don't love fixing a look of things with margins.

X-Ref (I'm working on fix for your issue): #11407

@IsaiahvH
Copy link
Author

Uhm, that's okay with me but why can't we use margins to solve this?
The thing is, the two buttons have two borders, which touch each other and makes it look like one fat border...

Using margin-right:-1px; ensures the two borders overlap, making it look like one shared border between two buttons...

@zlatanvasovic
Copy link
Contributor

Your problem is fixed in #11435.

@mdo
Copy link
Member

mdo commented Dec 15, 2013

Fixed by #11435.

@mdo mdo closed this as completed Dec 15, 2013
@tlindig
Copy link
Contributor

tlindig commented Dec 15, 2013

This pull request #11435 you accepted is hacking.
It conceals the problem, but does not address the cause.

It dose two things.

.input-group-btn > .btn:not(:first-of-type):not(:last-of-type) {
  border-radius: 0;
}

That has nothing to do with this problem. But it make the css more complex.

.input-group-btn > .btn + .btn:last-of-type {
  margin-left: -5px;
}

Makes the css also more complex and is hacking. It works fine for font-size 14px, but not more. You want know the reason? Read the comment in my pull request #11817.

If you do not believe me, here is a example: http://jsbin.com/UNopeHOY/3/edit?html,css,output with
font-size: 17px

@IsaiahvH
Copy link
Author

Agree

@zlatanvasovic
Copy link
Contributor

@tlindig About what hacking are you talking about? :O

@IsaiahvH
Copy link
Author

I think it's already been solved at #11817

@tlindig
Copy link
Contributor

tlindig commented Dec 16, 2013

@zdroid

About what hacking are you talking about? :O

With hacking I mean a programming technique "try and error". The goal is to suppress the symptoms.

IMHO that kind of solution should be the last choice.

The first choice should be the elimination of the cause, if it is possible.

In this special case we have this situation:
The cause is the space character between the button elements in the button group.
The best way would be, to write no space. ( second form here: http://jsbin.com/UNopeHOY/5/edit?html,output )
The second way is, to reduce the size of that character to zero. -> #11817
But try, to move the button element exactly over this space, this is a very fragile solution. It will fail in the next situation. ( Issues #11883, Issue #11882)
So I called it hacking.

stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants