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

Fix right margin of the carousel "next" button #13293

Closed
wants to merge 1 commit into from

Conversation

killthekitten
Copy link
Contributor

The calculated offset of carousel's right-arrow differs with left-arrow on large viewport sizes. The problem was well described and illustrated here and here by @hnrch02. This PR is just a missing part of #13242

@mdo
Copy link
Member

mdo commented Apr 7, 2014

Sorry I missed that—why is this needed exactly? Are those numbers not equal on both sides without this?

@cvrebert
Copy link
Collaborator

cvrebert commented Apr 7, 2014

Also, are we sure that it doesn't vary by browser?

@killthekitten
Copy link
Contributor Author

@mdo visually they're not equal. That's very annoying if we use, for example, symmetrical background.

@killthekitten
Copy link
Contributor Author

@cvrebert please, @hnrch02, could you recheck it in different browsers? Have no chance to do it by myself at the moment

@mdo
Copy link
Member

mdo commented Apr 25, 2014

I'm inclined to not merge this one small tweak given it's a 1px change and is (I think?) entirely dependent on using Glyphicons. If folks use something else, I'm guessing it's not an issue?

@hnrch02
Copy link
Collaborator

hnrch02 commented Apr 25, 2014

I'm not sure this has anything to do with Glyphicons, it's a problem with rounding in Chrome. If we take the carousel on the JavaScript page of the docs for example, the carousel container has a width of 816px, both .carousel-controls ought to have 15% of that 816px which would be 122,4px. Bizarrely, Chrome rounds down on the left control and up on the right one, hence the difference of one pixel and this hackfix. It doesn't seem to occur in Firefox, so I'd also vote against merging this.

@mdo
Copy link
Member

mdo commented May 1, 2014

Silly rounding. Probably fine for most other use cases though. For example, 15% of 940px (one of our grid tiers) is 141px. Given the carousel can be fluid, I see no reason to account for a small rounding error by the browser.

@mdo mdo closed this May 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants