diff --git a/src/wp-admin/css/colors/_admin.scss b/src/wp-admin/css/colors/_admin.scss index 5953861985..03c932d604 100644 --- a/src/wp-admin/css/colors/_admin.scss +++ b/src/wp-admin/css/colors/_admin.scss @@ -487,6 +487,10 @@ body.more-filters-opened .more-filters:focus:before { color: $menu-highlight-text; } +#customize-footer-actions .devices button:focus { + border-bottom-color: $highlight-color; +} + /* Responsive Component */ div#wp-responsive-toggle a:before { diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index 560d85e783..c4b01c84f7 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -610,6 +610,7 @@ p.customize-section-description { #customize-preview iframe { width: 100%; height: 100%; + position: absolute; } .wp-full-overlay-sidebar { @@ -1311,6 +1312,127 @@ body.cheatin p { color: #00a0d2; } +/* Device/preview size toggles */ + +.wp-full-overlay { + background: #191e23; +} + +#customize-preview.wp-full-overlay-main { + background-color: #f1f1f1; +} + +.expanded #customize-footer-actions { + position: fixed; + bottom: 0; + left: 0; + width: 300px; + height: 45px; + border-top: 1px solid #ddd; +} + +#customize-footer-actions .devices { + float: right; +} + +#customize-footer-actions .devices button { + cursor: pointer; + background: transparent; + border: none; + height: 45px; + padding: 0 3px; + margin: 0 0 0 -4px; + box-shadow: none; + border-top: 1px solid transparent; + border-bottom: 4px solid transparent; + -webkit-transition: background .1s ease-in-out; + transition: background .1s ease-in-out; +} + +#customize-footer-actions .devices button:focus { + box-shadow: none; + outline: none; +} + +#customize-footer-actions .devices button:before { + display: inline-block; + -webkit-font-smoothing: antialiased; + font: normal 20px/30px "dashicons"; + vertical-align: top; + margin: 3px 0; + padding: 4px 8px; + color: #656a6f; +} + +#customize-footer-actions .devices button.active { + border-bottom-color: #191e23; +} + +#customize-footer-actions .devices button:hover, +#customize-footer-actions .devices button:focus { + background-color: #fff; +} + +#customize-footer-actions .devices button:focus { + background-color: #fff; + border-bottom-color: #0073aa; +} + +#customize-footer-actions .devices button.active:before, +#customize-footer-actions .devices button:hover:before, +#customize-footer-actions .devices button:focus:before { + color: #191e23; +} + +.wp-core-ui .wp-full-overlay .collapse-sidebar:hover, +.wp-core-ui .wp-full-overlay .collapse-sidebar:focus { + color: #191e23; +} + +#customize-footer-actions .devices .preview-desktop:before { + content: "\f472"; +} + +#customize-footer-actions .devices .preview-tablet:before { + content: "\f471"; +} + +#customize-footer-actions .devices .preview-mobile:before { + content: "\f470"; +} + +@media screen and (max-width:1024px) { + #customize-footer-actions .devices { + display: none; + } +} + +.collapsed #customize-footer-actions .devices button:before { + display: none; +} + +.collapsed #customize-footer-actions .devices .preview-full { + left: 0; +} + +.preview-mobile #customize-preview { + margin: auto 0 auto -160px; + width: 320px; + height: 480px; + max-height: 100%; + max-width: 100%; + left: 50%; +} + +.preview-tablet #customize-preview { + margin: auto 0 auto -3in; + width: 6in; + height: 9in; + max-height: 100%; + max-width: 100%; + left: 50%; +} + .widget-reorder-nav span, .menu-item-reorder-nav button { position: relative; diff --git a/src/wp-admin/customize.php b/src/wp-admin/customize.php index 1bc702bfae..7e13ee48b6 100644 --- a/src/wp-admin/customize.php +++ b/src/wp-admin/customize.php @@ -148,6 +148,26 @@ do_action( 'customize_controls_print_scripts' );