openfoodfoundation/openfoodnetwork

View on GitHub
app/webpacker/css/shared/utilities.scss

Summary

Maintainability
Test Coverage
.ellipsed {
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.line-clamp-1 {
  // Clip content instead of wrapping to new line
  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-line-clamp: 1; /* number of lines to show */
  line-clamp: 1;
  -webkit-box-orient: vertical;
}

.no-wrap {
  white-space: nowrap;
}

.flex {
  display: flex;

  &.flex-align-center {
    align-items: center;
  }

  &.flex-justify-end {
    justify-content: flex-end;
  }
}