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(pagination): update flex:1 and update top offset to fix IE11 #4315

Merged

Conversation

kbondanza
Copy link
Contributor

Closes #4161

This PR updates flex: 1 to be flex: 1 1 auto. flex: 1 was causing the --form-item to collapse within the pagination component in IE11. flex: 1 is equivalent to flex: 1 1 0, which sets the flex-basis to 0, this is fine in most browsers. However in IE11, this only works when the flex container uses flex-direction: row. For flex-direction: column, children will overlap as if they would not consume any height.

This PR also updates top: auto to top: 50%, and removed bottom: auto. Added transform: translateY(-50%) as this will center the position absolute svg in a flex container in IE11. align-items: center will not center a flex child that has position: absolute set in IE11.

Changelog

New

  • Add transform: translateY(-50%) on #{$prefix}--pagination .#{$prefix}--select__arrow

Changed

  • Update flex: 1 to be flex: 1 1 auto on #{$prefix}--form-item

  • Update top: auto to top: 50% on #{$prefix}--pagination .#{$prefix}--select__arrow

Removed

  • Remove bottom: auto on #{$prefix}--pagination .#{$prefix}--select__arrow

Testing / Reviewing

@kbondanza kbondanza requested a review from a team as a code owner October 12, 2019 19:25
@ghost ghost requested review from emyarod and jnm2377 October 12, 2019 19:26
@netlify
Copy link

netlify bot commented Oct 12, 2019

Deploy preview for the-carbon-components ready!

Built with commit 01a823b

https://deploy-preview-4315--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Oct 12, 2019

Deploy preview for carbon-components-react failed.

Built with commit 01a823b

https://app.netlify.com/sites/carbon-components-react/deploys/5da737ffcc8b9a000b7d5968

@netlify
Copy link

netlify bot commented Oct 12, 2019

Deploy preview for carbon-elements ready!

Built with commit 01a823b

https://deploy-preview-4315--carbon-elements.netlify.com

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me, overlap issue resolved in React, and alignment issue resolved in vanilla

image

image

Copy link
Contributor

@jnm2377 jnm2377 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for contributing this! 🎉

Copy link
Contributor

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Looks great! Mind making a quick comment about why we had to add this syntax for IE11 in the source files?

@joshblack joshblack merged commit 53daf3c into carbon-design-system:master Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pagination]: Page and Item selector controls overlap text in IE11
4 participants