<!DOCTYPE html><!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] --> | |
<style> | |
.container { | |
width: fit-content; | |
background: red; | |
} | |
.content { | |
display: inline-block; | |
width: 100px; | |
height: 100px; | |
background: green; | |
vertical-align: top; | |
} | |
</style> | |
<div class=container> | |
<div class=content></div> | |
</div> |