trungdq88/css-flexbox-text-ellipsis

Chrome (Version 121.0.6167.87 (Official Build) (64-bit))solved

Opened this issue · 0 comments

but now below code has the same problem:

  <div class="target">
    <div class="target-title">
      <div class="inner">
        Text here is very very long that it might
        get truncate if this box get resized too small
      </div>
    </div>
    <div class="target-button">
      Button
    </div>
  </div>

css:

    .target {
      display: flex;
      width: 100%;
      justify-content: space-between;
      align-items: center;
    }

    .target-title {
      padding: 5px;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .inner {}

    .target-button {
      padding: 5px 10px;
      background: #2196F3;
      color: white;
    }

solve:

    .target {
      display: flex;
      width: 100%;
      justify-content: space-between;
      align-items: center;
    }

    .target-title {
      padding: 5px;
      min-width: 0;
    }

    .inner {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .target-button {
      padding: 5px 10px;
      background: #2196F3;
      color: white;
    }