video-title ellipsis bug (tweaking)

by Spencer Smith

HTML

<div id="root">
  <div id="styled-app">
    <div id="styled-page">
      <div id="videos-wrap">
        <div id="video-card">
          <div id="card-top">
            <div id="video-title">
              We Can't Ignore This Any Longer | Building Our Mountain Home
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

CSS

* { box-sizing: border-box; }
body {
  margin: 10px;
}
#root {
  display: flex;
  justify-content: center;
}
#styled-app {
  display: flex;
  justify-content: center;
  max-width: 600px;
  flex-grow: 1;
  margin: 60px 0;
}
#styled-page {
  flex-grow: 1;
  max-width: 600px;
}
#videos-wrap {
  position: relative;
  transition: opacity 0.15s;
  background-color: lightblue;
}
#video-card {
  background-color: rgb(0 0 0 / 2.5%);
  margin: 15px 0;
  border-radius: 3px;
}
#card-top {
  display: flex;
  align-items: flex-start;
  padding: 15px;
  padding-bottom: 0;
  gap: 15px;
  overflow: hidden;
  min-width: 0;
}
#video-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  font-weight: 500;
  background-color: lightgreen;
  
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  white-space: nowrap;
}