From 8371c1c4cd88a173421c3dfce6c29211416d685f Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 17 Apr 2017 11:12:21 +0530 Subject: [PATCH] Text overflow fix for product text in portal --- erpnext/public/css/website.css | 16 +++++++++------- erpnext/public/less/website.less | 14 ++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css index 0370dd023b..0245675225 100644 --- a/erpnext/public/css/website.css +++ b/erpnext/public/css/website.css @@ -26,8 +26,6 @@ background-size: cover; background-repeat: no-repeat; background-position: center top; - border-radius-top: 4px; - border-radius-right: 4px; } .product-image.missing-image { width: 100%; @@ -36,8 +34,6 @@ background-size: cover; background-repeat: no-repeat; background-position: center top; - border-radius-top: 4px; - border-radius-right: 4px; position: relative; background-color: #EBEFF2; } @@ -45,9 +41,6 @@ font-size: 32px; color: #d1d8dd; } -.product-text { - padding: 15px 0px; -} .product-search { margin-bottom: 15px; } @@ -246,6 +239,15 @@ padding: 15px; word-wrap: break-word; height: 75px; + display: block; + /* Fallback for non-webkit */ + display: -webkit-box; + max-width: 100%; + margin: 0 auto; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .product-image-wrapper { padding-bottom: 40px; diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less index b733dabaf7..79a89a050a 100644 --- a/erpnext/public/less/website.less +++ b/erpnext/public/less/website.less @@ -36,8 +36,6 @@ background-size: cover; background-repeat: no-repeat; background-position: center top; - border-radius-top: 4px; - border-radius-right: 4px; } .product-image.missing-image { @@ -51,10 +49,6 @@ color: @border-color; } -.product-text { - padding: 15px 0px; -} - .product-search { margin-bottom: 15px; } @@ -316,6 +310,14 @@ padding: 15px; word-wrap: break-word; height: 75px; + display: block; /* Fallback for non-webkit */ + display: -webkit-box; + max-width: 100%; + margin: 0 auto; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; } .product-image-wrapper {