<!doctype html><style>
* { border: 1px solid black; }
html { background: white; }
.flex {
width: max-content;
display: flex;
background: pink;
height: 50px;
}
.item {
flex-basis: 1px;
background: orange;
}
</style><body class="flex"><div class="item">hello