From 8072007782f420529f827d8672a9c114d449f46a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 9 Jul 2021 14:50:55 +0100 Subject: [PATCH] Fix small visual regression with the site name on url previews --- res/css/views/rooms/_LinkPreviewWidget.scss | 6 +++--- src/components/views/rooms/LinkPreviewWidget.tsx | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/res/css/views/rooms/_LinkPreviewWidget.scss b/res/css/views/rooms/_LinkPreviewWidget.scss index e1628e19a6..0832337ecd 100644 --- a/res/css/views/rooms/_LinkPreviewWidget.scss +++ b/res/css/views/rooms/_LinkPreviewWidget.scss @@ -43,10 +43,10 @@ limitations under the License. -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; -} -.mx_LinkPreviewWidget_siteName { - display: inline; + .mx_LinkPreviewWidget_siteName { + font-weight: normal; + } } .mx_LinkPreviewWidget_description { diff --git a/src/components/views/rooms/LinkPreviewWidget.tsx b/src/components/views/rooms/LinkPreviewWidget.tsx index db13021b32..7e6dd86d19 100644 --- a/src/components/views/rooms/LinkPreviewWidget.tsx +++ b/src/components/views/rooms/LinkPreviewWidget.tsx @@ -139,8 +139,12 @@ export default class LinkPreviewWidget extends React.Component {
{ img }
-
{ p["og:title"] }
-
{ p["og:site_name"] ? (" - " + p["og:site_name"]) : null }
+
+ { p["og:title"] } + { p["og:site_name"] && + { (" - " + p["og:site_name"]) } + } +
{ description }