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 Built from https://develop.svn.wordpress.org/trunk@37247 git-svn-id: http://core.svn.wordpress.org/trunk@37213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1592,9 +1592,9 @@ body.full-overlay-active {
|
||||
}
|
||||
|
||||
.preview-tablet .wp-full-overlay-main {
|
||||
margin: auto -3in auto 0;
|
||||
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 -360px auto 0;
|
||||
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%;
|
||||
right: 50%;
|
||||
|
||||
Reference in New Issue
Block a user