Ticket #31336: 31336.4.diff
File 31336.4.diff, 17.9 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
50 50 overflow-x: hidden; 51 51 } 52 52 53 #customize- info {53 #customize-controls .customize-info { 54 54 border: none; 55 55 border-top: 1px solid #ddd; 56 border-bottom: 1px solid #ddd; 56 57 } 57 58 58 #customize- info .accordion-section-title {59 background -color: #fff;60 color: # 666666;59 #customize-controls .customize-info .accordion-section-title { 60 background: transparent !important; 61 color: #555 !important; 61 62 border-left: none; 62 63 border-right: none; 63 border-bottom: 1px solid #eeeeee; 64 border-bottom: none; 65 cursor: default; 64 66 } 65 67 66 #customize- info.open .accordion-section-title:after,67 #customize- info .accordion-section-title:hover:after,68 #customize- info .accordion-section-title:focus:after {69 color: # 555555;68 #customize-controls .customize-info.open .accordion-section-title:after, 69 #customize-controls .customize-info .accordion-section-title:hover:after, 70 #customize-controls .customize-info .accordion-section-title:focus:after { 71 color: #333; 70 72 } 71 73 72 #customize-info .preview-notice { 74 #customize-controls .customize-info .accordion-section-title:after { 75 display: none; 76 } 77 78 #customize-controls .customize-info .preview-notice { 73 79 font-size: 13px; 74 80 line-height: 24px; 75 81 } 76 82 77 #customize-info .theme-name { 83 #customize-controls .control-section .customize-section-title, 84 #customize-controls .customize-info .panel-title { 78 85 font-size: 20px; 79 86 font-weight: 200; 80 87 line-height: 24px; … … 81 88 display: block; 82 89 } 83 90 84 #customize-info .theme-screenshot { 85 width: 258px; 91 #customize-controls .customize-info .customize-help-toggle { 92 position: absolute; 93 top: 4px; 94 right: 1px; 95 padding: 10px 8px 10px 10px; 96 cursor: pointer; 86 97 } 87 98 88 #customize-info .theme-description { 89 margin-top: 1em; 90 color: #666666; 91 line-height: 20px; 99 #customize-controls .customize-info.open .customize-help-toggle { 100 color: #0073aa; 92 101 } 93 102 103 #customize-controls .customize-info .customize-panel-description { 104 display: none; 105 background: transparent; 106 padding: 0 12px 16px 12px; 107 } 108 94 109 #customize-theme-controls .control-section { 95 110 border: none; 96 111 } … … 101 116 border-bottom: 1px solid #eeeeee; 102 117 } 103 118 119 #customize-theme-controls .accordion-section-title:after { 120 content: "\f345"; 121 } 122 123 .rtl #customize-theme-controls .accordion-section-title:after { 124 content: "\f341"; 125 } 126 104 127 #customize-theme-controls .accordion-section-content { 105 color: #555 555;106 background: #fff;128 color: #555; 129 background: transparent; 107 130 } 108 131 109 #customize-info.open .accordion-section-title, 110 #customize-info .accordion-section-title:hover, 111 #customize-info .accordion-section-title:focus, 112 #customize-theme-controls .control-section:hover > .accordion-section-title, 113 #customize-theme-controls .control-section .accordion-section-title:hover, 114 #customize-theme-controls .control-section.open .accordion-section-title, 115 #customize-theme-controls .control-section .accordion-section-title:focus { 116 color: #23282d; 117 background: #f5f5f5; 132 #customize-controls .control-section:hover > .accordion-section-title, 133 #customize-controls .control-section .accordion-section-title:hover, 134 #customize-controls .control-section.open .accordion-section-title, 135 #customize-controls .control-section .accordion-section-title:focus { 136 color: #fff; 137 background: #0073aa; 118 138 } 119 139 120 140 .js .control-section:hover .accordion-section-title, … … 128 148 #customize-theme-controls .control-section .accordion-section-title:hover:after, 129 149 #customize-theme-controls .control-section.open .accordion-section-title:after, 130 150 #customize-theme-controls .control-section .accordion-section-title:focus:after { 131 color: # 555;151 color: #fff; 132 152 } 133 153 134 #customize-info.open,135 154 #customize-theme-controls .control-section.open { 136 155 border-bottom: 1px solid #eeeeee; 137 156 } … … 145 164 border-bottom-color: #ddd; 146 165 } 147 166 148 #customize-theme-controls > ul, 167 #customize-theme-controls > ul { 168 margin: 0; 169 } 170 149 171 #customize-theme-controls .accordion-section-content { 150 172 margin: 0; 173 position: absolute; 174 left: 100%; 175 top: 0; 176 width: -webkit-calc(100% - 24px); 177 width: calc(100% - 24px); 178 padding: 12px; 151 179 } 152 180 181 h3.customize-section-title { 182 margin: -12px; 183 padding: 12px; 184 border-bottom: 1px solid #ddd; 185 background: #fff; 186 color: #555; 187 cursor: pointer; 188 } 189 190 h3.customize-section-title:before { 191 font: normal 20px/1 dashicons; 192 content: "\f341"; 193 -webkit-font-smoothing: antialiased; 194 -moz-osx-font-smoothing: grayscale; 195 position: relative; 196 top: 3px; 197 margin: 0 6px 0 2px; 198 } 199 200 .rtl h3.customize-section-title:before { 201 content: "\f345"; 202 } 203 204 h3.customize-section-title:hover, 205 h3.customize-section-title:focus { 206 background: #0073aa; 207 color: #fff; 208 } 209 210 #customize-theme-controls .control-section .accordion-section-content > li.customize-control:nth-child(2) { 211 margin-top: 12px; 212 } 213 214 #customize-theme-controls { 215 position: relative; 216 left: 0; 217 transition: .18s left ease-in-out; 218 } 219 220 .section-open #customize-info, 221 .section-open #customize-theme-controls { 222 left: -100%; 223 } 224 225 .section-open .control-panel-back { 226 display: none; 227 } 228 153 229 .control-section.control-panel > .accordion-section-title { 154 230 padding-right: 54px; 155 231 } … … 169 245 170 246 #customize-theme-controls .control-section.control-panel > h3.accordion-section-title:focus:after, 171 247 #customize-theme-controls .control-section.control-panel > h3.accordion-section-title:hover:after { 172 background: # ddd;173 color: # 000;248 background: #00a0d2; 249 color: #fff; 174 250 border: 1px solid #d9d9d9; 175 251 border-right: none; 176 252 margin-top: -12px; … … 184 260 left: 300px; 185 261 top: 0; 186 262 width: 300px; 187 border-top: 1px solid #ddd;188 263 -webkit-transition: left ease-in-out .18s; 189 264 transition: left ease-in-out .18s; 190 265 } … … 242 317 transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out; 243 318 } 244 319 320 .customize-panel-back { 321 display: block; 322 float: left; 323 width: 45px; 324 height: 69px; 325 padding-right: 2px; 326 background: #eee; 327 border-right: 1px solid #ddd; 328 cursor: pointer; 329 -webkit-transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out; 330 transition: left .18s ease-in-out, color .1s ease-in-out, background .1s ease-in-out; 331 } 332 333 245 334 .ios .control-panel-back { 246 335 -webkit-transition: left 0s; 247 336 transition: left 0s; … … 251 340 display: none; 252 341 } 253 342 343 .panel-meta.customize-info .accordion-section-title { 344 margin-left: 47px; 345 border-left: 1px solid #ddd; 346 } 347 254 348 .customize-overlay-close:focus, 255 349 .customize-overlay-close:hover, 256 350 .customize-controls-close:focus, … … 267 361 box-shadow: none; 268 362 } 269 363 364 .customize-panel-back:hover, 365 .customize-panel-back:focus { 366 background: #0073aa; 367 border-color: #ccc; 368 color: #fff; 369 outline: none; 370 -webkit-box-shadow: none; 371 box-shadow: none; 372 } 373 270 374 .customize-overlay-close:before, 271 375 .customize-controls-close:before { 272 376 font: normal 22px/45px dashicons; … … 276 380 left: 13px; 277 381 } 278 382 383 .customize-panel-back:before { 384 font: normal 20px/69px dashicons; 385 content: "\f341"; 386 position: relative; 387 left: 13px; 388 } 389 279 390 .control-panel-back:before { 280 391 font: normal 20px/45px dashicons; 281 392 content: "\f341"; … … 285 396 } 286 397 287 398 .in-sub-panel .control-panel-back { 288 left: 0; 399 /* left: 0; @todo decide whether to bring back the back buttons in the header */ 289 400 } 290 401 291 402 .current-panel > .accordion-section-title { … … 345 456 transition: left 0s; 346 457 } 347 458 348 .control-section.control-panel .accordion-section-title .panel-title {349 font-size: 20px;350 font-weight: 200;351 line-height: 24px;352 display: block;353 border: none;354 }355 356 .control-section.control-panel .preview-notice {357 font-size: 13px;358 line-height: 24px;359 }360 361 459 p.customize-section-description { 362 460 font-style: normal; 461 margin-top: 22px; 462 margin-bottom: 0; 363 463 } 364 464 365 465 .customize-control { … … 366 466 width: 100%; 367 467 float: left; 368 468 clear: both; 369 margin-bottom: 8px;469 margin-bottom: 12px; 370 470 } 371 471 372 472 .customize-control select, … … 902 1002 } 903 1003 904 1004 .control-section-themes .accordion-section-title { 905 margin: 15px 0;1005 margin: 0 0 15px 0; 906 1006 } 907 1007 908 1008 .customize-themes-panel .accordion-section-title { … … 928 1028 font-weight: normal; 929 1029 } 930 1030 1031 .control-section-themes .accordion-section-title:before { 1032 display: none; 1033 } 1034 931 1035 .customize-themes-panel { 932 1036 display: none; 933 1037 padding: 0 8px; … … 956 1060 margin-bottom: 8px; 957 1061 } 958 1062 1063 #customize-theme-controls .themes.accordion-section-content { 1064 position: relative; 1065 left: 0; 1066 padding: 0; 1067 width: 100%; 1068 } 1069 959 1070 .wp-customizer .theme-browser .themes { 960 1071 padding-bottom: 8px; 961 1072 } -
src/wp-admin/css/customize-widgets.css
585 585 586 586 587 587 @media screen and (max-height: 700px) and (min-width: 981px) { 588 .customize-control {588 .customize-control-widget { 589 589 margin-bottom: 0; 590 590 } 591 591 .widget-top { -
src/wp-admin/customize.php
143 143 144 144 <div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the Customizer for compat --> 145 145 <div class="wp-full-overlay-sidebar-content" tabindex="-1"> 146 <div id="customize-info" class="accordion-section ">147 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>" tabindex="0">146 <div id="customize-info" class="accordion-section customize-info"> 147 <div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Customizer Options' ); ?>"> 148 148 <span class="preview-notice"><?php 149 echo sprintf( __( 'You are customizing %s' ), '<strong class=" theme-name site-title">' . get_bloginfo( 'name' ) . '</strong>' );149 echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title site-title">' . get_bloginfo( 'name' ) . '</strong>' ); 150 150 ?></span> 151 <span class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></span> 151 152 </div> 152 <div class=" accordion-section-content"><?php153 <div class="customize-panel-description"><?php 153 154 _e( 'The Customizer allows you to preview changes to your site before publishing them. You can also navigate to different pages on your site to preview them.' ); 154 155 ?></div> 155 156 </div> -
src/wp-admin/js/customize-controls.js
446 446 var section = this; 447 447 448 448 // Expand/Collapse accordion sections on click. 449 section.container.find( '.accordion-section-title ' ).on( 'click keydown', function( event ) {449 section.container.find( '.accordion-section-title, .customize-section-title' ).on( 'click keydown', function( event ) { 450 450 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 451 451 return; 452 452 } … … 499 499 * @param {Object} args 500 500 */ 501 501 onChangeExpanded: function ( expanded, args ) { 502 var section = this, 502 var position, scroll, section = this, 503 container = section.container.closest( '.accordion-container' ), 503 504 content = section.container.find( '.accordion-section-content' ), 505 overlay = section.container.closest( '.wp-full-overlay' ), 504 506 expand; 505 507 506 508 if ( expanded ) { … … 509 511 expand = args.completeCallback; 510 512 } else { 511 513 expand = function () { 512 content.stop().slideDown( args.duration, args.completeCallback );513 514 section.container.addClass( 'open' ); 515 overlay.addClass( 'section-open' ); 516 position = content.offset().top; 517 scroll = container.scrollTop(); 518 content.css( 'margin-top', ( 45 - position - scroll ) ); 514 519 }; 515 520 } 516 521 … … 533 538 534 539 } else { 535 540 section.container.removeClass( 'open' ); 536 content.slideUp( args.duration, args.completeCallback ); 541 overlay.removeClass( 'section-open' ); 542 content.css( 'margin-top', 'inherit' ); 543 container.scrollTop( 0 ); 537 544 } 538 545 } 539 546 }); … … 1012 1019 } 1013 1020 }); 1014 1021 1022 // Close panel. 1023 panel.container.find( '.customize-panel-back' ).on( 'click keydown', function( event ) { 1024 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 1025 return; 1026 } 1027 event.preventDefault(); // Keep this AFTER the key filter above 1028 1029 if ( panel.expanded() ) { 1030 panel.collapse(); 1031 } 1032 }); 1033 1015 1034 meta = panel.container.find( '.panel-meta:first' ); 1016 1035 1017 meta.find( '> .accordion-section-title ' ).on( 'click keydown', function( event ) {1036 meta.find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) { 1018 1037 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 1019 1038 return; 1020 1039 } … … 1024 1043 return; 1025 1044 } 1026 1045 1027 var content = meta.find( '. accordion-section-content:first' );1046 var content = meta.find( '.customize-panel-description:first' ); 1028 1047 if ( meta.hasClass( 'open' ) ) { 1029 1048 meta.toggleClass( 'open' ); 1030 1049 content.slideUp( panel.defaultExpandedArguments.duration ); … … 1089 1108 // Note: there is a second argument 'args' passed 1090 1109 var position, scroll, 1091 1110 panel = this, 1092 section = panel.container.closest( '.accordion-section' ), 1111 section = panel.container.closest( '.accordion-section' ), // This is actually the panel. 1093 1112 overlay = section.closest( '.wp-full-overlay' ), 1094 1113 container = section.closest( '.wp-full-overlay-sidebar-content' ), 1095 1114 siblings = container.find( '.open' ), 1096 1115 topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ), 1097 backBtn = overlay.find( '.control-panel-back' ),1116 backBtn = section.find( '.customize-panel-back' ), 1098 1117 panelTitle = section.find( '.accordion-section-title' ).first(), 1099 1118 content = section.find( '.control-panel-content' ); 1100 1119 … … 2573 2592 var parent, topFocus, 2574 2593 body = $( document.body ), 2575 2594 overlay = body.children( '.wp-full-overlay' ), 2576 title = $( '#customize-info . theme-name.site-title' ),2595 title = $( '#customize-info .panel-title.site-title' ), 2577 2596 closeBtn = $( '.customize-controls-close' ), 2578 2597 saveBtn = $( '#save' ); 2579 2598 … … 2588 2607 }); 2589 2608 2590 2609 // Expand/Collapse the main customizer customize info. 2591 $( ' #customize-info' ).find( '> .accordion-section-title' ).on( 'click keydown', function( event ) {2610 $( '.customize-info' ).find( '> .accordion-section-title .customize-help-toggle' ).on( 'click keydown', function( event ) { 2592 2611 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 2593 2612 return; 2594 2613 } 2595 2614 event.preventDefault(); // Keep this AFTER the key filter above 2596 2615 2597 var section = $( this ). parent(),2598 content = section.find( '. accordion-section-content:first' );2616 var section = $( this ).closest( '.accordion-section' ), 2617 content = section.find( '.customize-panel-description:first' ); 2599 2618 2600 2619 if ( section.hasClass( 'cannot-expand' ) ) { 2601 2620 return; -
src/wp-includes/class-wp-customize-panel.php
315 315 */ 316 316 protected function render_content() { 317 317 ?> 318 <li class="panel-meta accordion-section control-section<?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>"> 319 <div class="accordion-section-title" tabindex="0"> 318 <li class="panel-meta customize-info accordion-section <?php if ( empty( $this->description ) ) { echo ' cannot-expand'; } ?>"> 319 <span class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span> 320 <div class="accordion-section-title"> 320 321 <span class="preview-notice"><?php 321 322 /* translators: %s is the site/panel title in the Customizer */ 322 323 echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">' . esc_html( $this->title ) . '</strong>' ); 323 324 ?></span> 325 <span class="customize-help-toggle dashicons dashicons-editor-help" tabindex="0"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></span> 324 326 </div> 325 327 <?php if ( ! empty( $this->description ) ) : ?> 326 <div class=" accordion-section-contentdescription">328 <div class="description customize-panel-description"> 327 329 <?php echo $this->description; ?> 328 330 </div> 329 331 <?php endif; ?> -
src/wp-includes/class-wp-customize-section.php
305 305 <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>"> 306 306 <h3 class="accordion-section-title" tabindex="0"> 307 307 <?php echo esc_html( $this->title ); ?> 308 <span class="screen-reader-text"><?php _e( 'Press return or enter to expand' ); ?></span>308 <span class="screen-reader-text"><?php _e( 'Press return or enter to open' ); ?></span> 309 309 </h3> 310 310 <ul class="accordion-section-content"> 311 <?php if ( ! empty( $this->description ) ) : ?> 312 <li class="customize-section-description-container"> 311 <li class="customize-section-description-container"> 312 <h3 class="customize-section-title" tabindex="0"> 313 <?php echo esc_html( $this->title ); ?> 314 <span class="screen-reader-text"><?php _e( 'Press return or enter to close' ); ?></span> 315 </h3> 316 <?php if ( ! empty( $this->description ) ) : ?> 313 317 <p class="description customize-section-description"><?php echo $this->description; ?></p> 314 < /li>315 < ?php endif; ?>318 <?php endif; ?> 319 </li> 316 320 </ul> 317 321 </li> 318 322 <?php