Skip to content

Commit 2f50ba2

Browse files
committed
General: Add styles for extender usage of do_accordion_section().
Follow up to [59224]. Add CSS to cover usage of the do_accordion_section() function when used in extender contexts outside of the existing WordPress core usage. Reviewed-by joemcgill, jorbin. Merges [59772] to 6.7 brnch. Props mboynes, jorbin, joemcgill, joedolson. Fixes #62907. git-svn-id: https://develop.svn.wordpress.org/branches/6.7@59779 602fd350-edb4-49c9-b593-d223f7449a82
1 parent df2d403 commit 2f50ba2

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/wp-admin/css/common.css

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,6 +2433,12 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
24332433
.nav-menus-php .metabox-holder h3 {
24342434
padding: 0;
24352435
}
2436+
2437+
.accordion-container h3.accordion-section-title {
2438+
padding: 0 !important;
2439+
}
2440+
2441+
.accordion-section-title button.accordion-trigger,
24362442
.nav-menus-php .metabox-holder .accordion-section-title button.accordion-trigger {
24372443
background: inherit;
24382444
color: #1d2327;
@@ -2446,27 +2452,38 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
24462452
line-height: 1.5;
24472453
cursor: pointer;
24482454
}
2455+
2456+
.accordion-section-title button.accordion-trigger:focus,
24492457
.nav-menus-php .metabox-holder .accordion-section-title button.accordion-trigger:focus {
24502458
box-shadow: 0 0 0 2px #2271b1;
24512459
outline: 2px solid transparent;
24522460
}
2461+
2462+
.accordion-section-title span.dashicons.dashicons-arrow-down,
24532463
.nav-menus-php .metabox-holder .accordion-section-title span.dashicons.dashicons-arrow-down {
24542464
position: absolute;
24552465
right: 10px;
24562466
left: auto;
24572467
color: #787c82;
24582468
border-radius: 50px;
2469+
top: 50%;
2470+
transform: translateY(-50%);
24592471
}
2472+
2473+
.accordion-section-title:hover span.dashicons.dashicons-arrow-down,
24602474
.nav-menus-php .metabox-holder .accordion-section-title:hover span.dashicons.dashicons-arrow-down {
24612475
color: #1d2327;
24622476
}
2477+
2478+
.accordion-section-title span.dashicons.dashicons-arrow-down::before,
24632479
.nav-menus-php .metabox-holder .accordion-section-title span.dashicons.dashicons-arrow-down::before {
24642480
position: relative;
24652481
left: -1px;
24662482
}
24672483

2484+
.accordion-section.open .accordion-section-title span.dashicons.dashicons-arrow-down,
24682485
.nav-menus-php .metabox-holder .accordion-section.open .accordion-section-title span.dashicons.dashicons-arrow-down {
2469-
transform: rotate(180deg);
2486+
transform: rotate(180deg) translate(0, 50%);
24702487
}
24712488

24722489
#templateside ul li a {
@@ -3648,7 +3665,6 @@ img {
36483665

36493666
.accordion-section-title {
36503667
margin: 0;
3651-
padding: 12px 15px 15px;
36523668
position: relative;
36533669
border-left: 1px solid #dcdcde;
36543670
border-right: 1px solid #dcdcde;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ body.trashing #publish-settings {
431431
border-right: none;
432432
border-bottom: none;
433433
cursor: default;
434+
padding: 10px 10px 11px 14px;
434435
}
435436

436437
#customize-controls .customize-info.open .accordion-section-title:after,
@@ -1727,7 +1728,7 @@ p.customize-section-description {
17271728
border-left: none;
17281729
border-right: none;
17291730
margin: 0 0 15px;
1730-
padding-right: 100px; /* Space for the button */
1731+
padding: 12px 100px 15px 15px; /* Space for the button */
17311732
}
17321733

17331734
#customize-theme-controls .control-section-themes .customize-themes-panel .accordion-section-title:first-child:hover, /* Not a focusable element. */

0 commit comments

Comments
 (0)