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: flex stretch height when positioned child exists #1004

Merged
merged 21 commits into from Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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();
});
});