Skip to content

Commit

Permalink
Merge pull request #1004 from openkraken/fix/flex-stretch-height
Browse files Browse the repository at this point in the history
fix: flex stretch height when positioned child exists
  • Loading branch information
answershuto authored Dec 28, 2021
2 parents 1f527a5 + f795acc commit de099ae
Show file tree
Hide file tree
Showing 5 changed files with 875 additions and 1,280 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions integration_tests/specs/css/css-flexbox/position-absolute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,65 @@ describe('flexbox-position-absolute', () => {

await snapshot();
});

it('should works with image of position absolute and self no height', async () => {
const div = createElement('div', {
style: {
display: 'flex',
backgroundColor: 'yellow',
position: 'relative',
overflow: 'hidden',
}
}, [
createElement('img', {
src: 'assets/100x100-green.png',
style: {
position: 'absolute',
height: '200px'
}
}),
createElement('div', {
style: {
display: 'flex',
width: '50px',
padding: '20px 0',
position: 'relative'
}
})
]);
document.body.appendChild(div);

await snapshot(0.1);
});

it('should works with child of position absolute and self no height', async () => {
const div = createElement('div', {
style: {
display: 'flex',
alignItems: 'center',
backgroundColor: 'yellow',
position: 'relative',
overflow: 'hidden',
}
}, [
createElement('div', {
style: {
position: 'absolute',
width: '200px',
height: '200px',
backgroundColor: 'green'
}
}),
createElement('div', {
style: {
width: '200px',
padding: '150px 0',
position: 'relative'
}
})
]);
document.body.appendChild(div);

await snapshot();
});
});
Loading

0 comments on commit de099ae

Please sign in to comment.