Make WordPress Core

Changeset 37247


Ignore:
Timestamp:
04/19/2016 08:49:38 PM (10 years ago)
Author:
jorbin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/themes.css

    r37221 r37247  
    15931593
    15941594.preview-tablet .wp-full-overlay-main {
    1595         margin: auto 0 auto -3in;
    1596         width: 6in; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */
    1597         height: 9in;
     1595        margin: auto 0 auto -360px;
     1596        width: 720px; /* Size is loosely based on a typical "tablet" device size. Intentionally ambiguous - this does not represent any particular device precisely. */
     1597        height: 1080px;
    15981598        max-height: 100%;
    15991599        max-width: 100%;
Note: See TracChangeset for help on using the changeset viewer.