diff --git a/assets/scss/components/_reviews.scss b/assets/scss/components/_reviews.scss index 7f98a290..c275d2bf 100644 --- a/assets/scss/components/_reviews.scss +++ b/assets/scss/components/_reviews.scss @@ -21,6 +21,7 @@ $swiper-arrow-right-purple: './../icons/arrow-right-purple.svg'; } .c-review-carousel__summary { + @include truncate(4); color: $color-black; font-family: $font-regular; font-size: rem-calc(16px); diff --git a/assets/scss/tools/_tools.scss b/assets/scss/tools/_tools.scss index b3b045ea..f908a7e1 100644 --- a/assets/scss/tools/_tools.scss +++ b/assets/scss/tools/_tools.scss @@ -8,3 +8,4 @@ @import 'rem-calculations'; @import 'lists'; @import 'container'; +@import 'truncate'; diff --git a/assets/scss/tools/_truncate.scss b/assets/scss/tools/_truncate.scss new file mode 100644 index 00000000..8a76cd01 --- /dev/null +++ b/assets/scss/tools/_truncate.scss @@ -0,0 +1,7 @@ +@mixin truncate($lines: 1) { + display: -webkit-box; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + -webkit-line-clamp: $lines; +}