<!DOCTYPE html><!-- webkit-test-runner [ LayoutFormattingContextEnabled=true InlineFormattingContextIntegrationEnabled=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>
