-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(pagination): update flex:1 and update top offset to fix IE11 #4315
Conversation
Deploy preview for the-carbon-components ready! Built with commit 01a823b https://deploy-preview-4315--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react failed. Built with commit 01a823b https://app.netlify.com/sites/carbon-components-react/deploys/5da737ffcc8b9a000b7d5968 |
Deploy preview for carbon-elements ready! Built with commit 01a823b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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! 🎉
There was a problem hiding this 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?
Closes #4161
This PR updates
flex: 1
to beflex: 1 1 auto
.flex: 1
was causing the --form-item to collapse within the pagination component in IE11.flex: 1
is equivalent toflex: 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 usesflex-direction: row
. Forflex-direction: column
, children will overlap as if they would not consume any height.This PR also updates
top: auto
totop: 50%
, and removedbottom: auto
. Addedtransform: 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 hasposition: absolute
set in IE11.Changelog
New
transform: translateY(-50%)
on#{$prefix}--pagination .#{$prefix}--select__arrow
Changed
Update
flex: 1
to beflex: 1 1 auto
on#{$prefix}--form-item
Update
top: auto
totop: 50%
on#{$prefix}--pagination .#{$prefix}--select__arrow
Removed
bottom: auto
on#{$prefix}--pagination .#{$prefix}--select__arrow
Testing / Reviewing