Skip to content

Commit

Permalink
Merge pull request #13124 from Yassir4/10685-fix-product-description-…
Browse files Browse the repository at this point in the history
…truncation

Fix product description truncation
  • Loading branch information
filipefurtad0 authored Feb 7, 2025
2 parents d09efec + 2753f56 commit 2d6e627
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,25 @@
}

.product-description {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 0.75rem;
cursor: pointer;
// Force product description to be on one line
// and truncate with ellipsis
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: nowrap;
// line-clamp is not supported in Safari
// Trick to get overflow: hidden to work in old Safari
line-height: 1rem;
height: 1.75rem;

// Force truncation with ellipsis on all the children
* {
overflow: hidden;
text-overflow: ellipsis;
}

> div {
margin-bottom: 1.5rem; // Equivalent to p (trix doesn't use p as separator by default, so emulate div as p to be backward compatible)
}
Expand Down

0 comments on commit 2d6e627

Please sign in to comment.