Skip to content

Conversation

@albell
Copy link
Contributor

@albell albell commented Mar 16, 2015

Clipping the edge of a crucial slide in a responsive carousel looks really bad. This currently happens way too easily. Two fixes:

  1. Browsers (incl Chrome) don't seem to resolve all rounding-related layout issues until load. Listen for that as well as resize.

  2. Don't round slide CSS widths up to the nearest integer. This causes the last visible slide in the carousel to overflow the container. All modern browsers have used subpixel rendering for a while now. See column 4 in this chart:

http://cruft.io/posts/percentage-calculations-in-ie/

Clipping the edge of a crucial slide in a responsive carousel looks really bad. This currently happens way too easily. Two fixes:

1) Browsers don't seem to resolve all rounding-related layout issues until load. Listen for that as well as resize.

2) Don't round slide dimension up to the nearest integer. This causes overflow. All modern browsers have used subpixel rendering for a while now. See column 4 in this chart:

http://cruft.io/posts/percentage-calculations-in-ie/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed to prevent onResize from being called twice. It will be called on window.load so we no longer need it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants