Lebar CSS sesuai dengan konten
width: fit-content;
Ugliest Unicorn
width: fit-content;
.container {
border: 2px solid #ccc;
padding: 10px;
width: 20em;
}
.item {
width: -moz-max-content;
width: max-content;
background-color: #8ca0ff;
padding: 5px;
margin-bottom: 1em;
}