Skip to content

Commit ba07b22

Browse files
committed
Customize: Fix positioning of outer section (e.g. publish settings) on large screen sizes.
Also fix preview link CSS for desktop and mobile. Props sayedwp, bduclos. See #39896. Fixes #42051. git-svn-id: https://develop.svn.wordpress.org/trunk@41677 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 4938052 commit ba07b22

2 files changed

Lines changed: 24 additions & 19 deletions

File tree

src/wp-admin/css/customize-controls.css

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ body:not(.ready) #customize-save-button-wrapper .save {
4242
border-radius: 3px 0 0 3px;
4343
}
4444

45-
#customize-outer-theme-controls-wrapper {
45+
#customize-sidebar-outer-content {
4646
position: absolute;
4747
top: 0;
4848
bottom: 0;
@@ -56,10 +56,7 @@ body:not(.ready) #customize-save-button-wrapper .save {
5656
background: #eee;
5757
transition: left .18s;
5858
border-right: 1px solid #ddd;
59-
}
60-
61-
.outer-section-open .wp-full-overlay.expanded {
62-
margin-left: 300px;
59+
height: 100%;
6360
}
6461

6562
#customize-theme-controls .control-section-outer {
@@ -74,7 +71,7 @@ body:not(.ready) #customize-save-button-wrapper .save {
7471
display: block;
7572
}
7673

77-
.outer-section-open .wp-full-overlay.expanded #customize-outer-theme-controls-wrapper {
74+
.outer-section-open .wp-full-overlay.expanded #customize-sidebar-outer-content {
7875
visibility: visible;
7976
left: 0;
8077
transition: left .18s;
@@ -85,11 +82,8 @@ body:not(.ready) #customize-save-button-wrapper .save {
8582
}
8683

8784
.outer-section-open .wp-full-overlay.expanded #customize-preview {
88-
opacity: 0.4;
89-
}
90-
91-
body.outer-section-open .wp-full-overlay.expanded .wp-full-overlay-main {
9285
left: 300px;
86+
opacity: 0.4;
9387
}
9488

9589
#customize-outer-theme-controls li.notice {
@@ -199,12 +193,17 @@ body.trashing #publish-settings {
199193
display: block;
200194
}
201195

202-
.customize-copy-preview-link {
196+
.preview-link-wrapper .customize-copy-preview-link.preview-control-element.button {
197+
margin: 0;
203198
position: absolute;
204199
bottom: 9px;
205200
right: 0;
206201
}
207202

203+
.preview-link-wrapper {
204+
position: relative;
205+
}
206+
208207
.customize-copy-preview-link:before,
209208
.customize-copy-preview-link:after {
210209
content: "";
@@ -245,7 +244,7 @@ body.trashing #publish-settings {
245244
position: absolute;
246245
white-space: nowrap;
247246
overflow: hidden;
248-
width: 217px;
247+
width: 90%;
249248
bottom: 14px;
250249
font-size: 14px;
251250
text-decoration: none;
@@ -318,7 +317,7 @@ body.trashing #publish-settings {
318317
}
319318

320319
#customize-control-changeset_preview_link {
321-
margin-top: 20px;
320+
margin-top: 6px;
322321
}
323322

324323
#customize-control-changeset_status {
@@ -330,7 +329,7 @@ body.trashing #publish-settings {
330329
box-sizing: content-box;
331330
width: 100%;
332331
margin-left: -12px;
333-
padding: 12px 12px 18px;
332+
padding: 12px 12px 10px;
334333
background: #ffffff;
335334
border-bottom: 1px solid #ddd;
336335
margin-bottom: 0;
@@ -2711,6 +2710,14 @@ body.adding-widget .add-new-widget:before,
27112710
line-height: 3.2;
27122711
}
27132712

2713+
#customize-control-changeset_preview_link a {
2714+
bottom: 16px;
2715+
}
2716+
2717+
.preview-link-wrapper .customize-copy-preview-link.preview-control-element.button {
2718+
bottom: 10px;
2719+
}
2720+
27142721
.wp-core-ui.wp-customizer .button {
27152722
margin-top: 12px;
27162723
}
@@ -2810,7 +2817,7 @@ body.adding-widget .add-new-widget:before,
28102817

28112818
body.adding-widget div#available-widgets,
28122819
body.adding-menu-items div#available-menu-items,
2813-
body.outer-section-open div#customize-outer-theme-controls-wrapper {
2820+
body.outer-section-open div#customize-sidebar-outer-content {
28142821
top: 46px;
28152822
left: 0;
28162823
z-index: 10;

src/wp-admin/customize.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,8 @@
218218
</form>
219219
<div id="customize-preview" class="wp-full-overlay-main"></div>
220220
<div id="customize-sidebar-outer-content">
221-
<div id="customize-outer-theme-controls-wrapper">
222-
<div id="customize-outer-theme-controls">
223-
<ul class="customize-outer-pane-parent"><?php // Outer panel and sections are not implemented, but its here as a placeholder to avoid any side-effect in api.Section. ?></ul>
224-
</div>
221+
<div id="customize-outer-theme-controls">
222+
<ul class="customize-outer-pane-parent"><?php // Outer panel and sections are not implemented, but its here as a placeholder to avoid any side-effect in api.Section. ?></ul>
225223
</div>
226224
</div>
227225
<?php

0 commit comments

Comments
 (0)