Is it possible to hide columns with empty content via the grid-template-columns definition?

Keywords´╝Ü css-grid


I have a CSS grid with two columns. I may or may not render content inside the first column. In other words, the column div will always be present, its just that sometimes it might not have content therein. When there is no content in the first column I don't want that column to take up space, and when there is content I want it to have a max width of 100px. Is it possible to do this via the CSS Grid definition alone?

#container {
  display: grid;
  grid-template-columns: minmax(auto, 100px) auto;
  grid-gap: 5px;
  height: 200px;
  width: 100%;
  background-color: #8cffa0;
  padding: 10px;

#container > div {
  background-color: #c0c0c0;
<div id="container">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit.
     Placeat, rerum illo eligendi, hic eum magnam quo architecto necessitatibus sunt sequi repellendus suscipit fuga tenetur atque corrupti modi saepe! Iusto, provident.