From 117b9c115d3fb421820fbef44e39ac4328f3c7c1 Mon Sep 17 00:00:00 2001 From: maTh Date: Mon, 3 Oct 2022 17:07:15 +0200 Subject: Improved: Article summary. Cut the text with better CSS (#4666) * phtml + css * trim the white spaces that comes from stripping --- p/themes/base-theme/frss.css | 7 ++++--- p/themes/base-theme/frss.rtl.css | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'p/themes/base-theme') diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.css index 879dcdd2c..46fffb826 100644 --- a/p/themes/base-theme/frss.css +++ b/p/themes/base-theme/frss.css @@ -1204,13 +1204,14 @@ a.website:hover .favicon { } .flux .item.title .summary { - max-height: 3em; + display: -webkit-box; color: var(--frss-font-color-grey-dark); font-size: 0.9rem; font-weight: normal; - white-space: initial; - overflow: hidden; text-overflow: ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + white-space: break-spaces; } .flux .item.title .author { diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.css index 4486e7745..4d731e6f7 100644 --- a/p/themes/base-theme/frss.rtl.css +++ b/p/themes/base-theme/frss.rtl.css @@ -1204,13 +1204,14 @@ a.website:hover .favicon { } .flux .item.title .summary { - max-height: 3em; + display: -webkit-box; color: var(--frss-font-color-grey-dark); font-size: 0.9rem; font-weight: normal; - white-space: initial; - overflow: hidden; text-overflow: ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + white-space: break-spaces; } .flux .item.title .author { -- cgit v1.2.3