From 5ecf38977e1a87c98c8438244f545b0706ec1b40 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 19 Apr 2016 20:49:38 +0000 Subject: [PATCH] Use `px` instead of `in` in device preview Devices are not consistent in how they handle `in` units. `in` was an attempt to cleverly disguise the exact size of the 'tablet'. The PHP code standards mentions avoiding clever code ( https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#clever-code ) but we should extend that idea to the css code as well. Props celloexpressions Fixes #36457 git-svn-id: https://develop.svn.wordpress.org/trunk@37247 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/themes.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index eb99e23290..b3b3b4e4ce 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -1592,9 +1592,9 @@ body.full-overlay-active { } .preview-tablet .wp-full-overlay-main { - margin: auto 0 auto -3in; - width: 6in; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */ - height: 9in; + margin: auto 0 auto -360px; + width: 720px; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */ + height: 1080px; max-height: 100%; max-width: 100%; left: 50%;