Fix flex children's width not calculated correctly on IE11 (#644)

This is a known issue on IE11 caused by the fact that IE add the padding value to the `flex-basis` leading to increase in the size of the column beyond intended. The block behave as if has `box-sizing` set to `border-box` even if it is set correctly.

Reference: https://github.com/philipwalton/flexbugs#flexbug-7
This commit is contained in:
Ahmad Alfy 2018-05-06 07:58:58 +02:00 committed by Yangshun Tay
parent 17dd6d9c8e
commit 5b3f54741e

View file

@ -888,7 +888,7 @@ pre code {
}
.gridBlock .twoByGridBlock {
box-sizing: border-box;
flex: 1 0 50%;
flex: 1 0 40%;
padding: 10px;
}
.gridBlock .threeByGridBlock {
@ -898,7 +898,7 @@ pre code {
}
.gridBlock .fourByGridBlock {
box-sizing: border-box;
flex: 1 0 25%;
flex: 1 0 20%;
padding: 10px;
}
@ -915,7 +915,7 @@ pre code {
}
.gridBlock .twoByGridBlock {
box-sizing: border-box;
flex: 1 0 50%;
flex: 1 0 40%;
padding: 10px 20px;
}
.gridBlock .threeByGridBlock {
@ -925,7 +925,7 @@ pre code {
}
.gridBlock .fourByGridBlock {
box-sizing: border-box;
flex: 1 0 25%;
flex: 1 0 20%;
padding: 10px 20px;
}
}