From dbb0e6345ec227977284e23376ad133e930ea42d Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Sat, 16 Apr 2022 06:13:11 +0000 Subject: [PATCH] Themes: Use consistent thumbnail sizes in Customizer preview screen. This ensures displaying theme thumbnails in consistent sizes in Customizer theme preview. Props poena, karpstrucking, costdev, audrasjb. Fixes #54188. git-svn-id: https://develop.svn.wordpress.org/trunk@53191 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/themes.css | 16 ++++++++++++++++ src/wp-admin/theme-install.php | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index aedecd5b32..6b598013a0 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -1852,6 +1852,22 @@ body.full-overlay-active { margin: 15px 0; width: 258px; border: 1px solid #c3c4c7; + position: relative; + overflow: hidden; +} + +.install-theme-info .theme-screenshot > img { + width: 100%; + height: auto; + position: absolute; + left: 0; + top: 0; +} + +.install-theme-info .theme-screenshot:after { + content: ""; + display: block; + padding-top: 66.66666666%; } .install-theme-info .theme-details { diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index 10aeeb344f..07a76ede7f 100644 --- a/src/wp-admin/theme-install.php +++ b/src/wp-admin/theme-install.php @@ -456,7 +456,9 @@ if ( $tab ) { ?> - +
+ +
<# if ( data.rating ) { #>