From 4ce163686d80f51cf97ccfc9b5a1b2873d8c9e11 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 9 Oct 2023 23:39:33 +0900 Subject: [PATCH] LinkControl: Prevent horizontally long preview image from being stretched vertically (#55156) --- .../block-editor/src/components/link-control/style.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/link-control/style.scss b/packages/block-editor/src/components/link-control/style.scss index b97745b72c4e2f..8883af42ee2ca6 100644 --- a/packages/block-editor/src/components/link-control/style.scss +++ b/packages/block-editor/src/components/link-control/style.scss @@ -297,9 +297,9 @@ $preview-image-height: 140px; img { display: block; // remove unwanted space below image - max-width: 100%; - height: $preview-image-height; // limit height - max-height: $preview-image-height; // limit height + width: 100%; + height: 100%; + object-fit: contain; } } }