Skip to content

Commit

Permalink
General: Add styles for extender usage of do_accordion_section().
Browse files Browse the repository at this point in the history
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.

Props mboynes, jorbin, joemcgill, joedolson. 
Fixes #62907.

git-svn-id: https://develop.svn.wordpress.org/trunk@59772 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
joedolson committed Feb 6, 2025
1 parent 4b05a83 commit b5b4e3a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
20 changes: 18 additions & 2 deletions src/wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,12 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
.nav-menus-php .metabox-holder h3 {
padding: 0;
}

.accordion-container h3.accordion-section-title {
padding: 0 !important;
}

.accordion-section-title button.accordion-trigger,
.nav-menus-php .metabox-holder .accordion-section-title button.accordion-trigger {
background: inherit;
color: #1d2327;
Expand All @@ -2446,27 +2452,38 @@ h1.nav-tab-wrapper, /* Back-compat for pre-4.4 */
line-height: 1.5;
cursor: pointer;
}

.accordion-section-title button.accordion-trigger:focus,
.nav-menus-php .metabox-holder .accordion-section-title button.accordion-trigger:focus {
box-shadow: 0 0 0 2px #2271b1;
outline: 2px solid transparent;
}

.accordion-section-title span.dashicons.dashicons-arrow-down,
.nav-menus-php .metabox-holder .accordion-section-title span.dashicons.dashicons-arrow-down {
position: absolute;
right: 10px;
left: auto;
color: #787c82;
border-radius: 50px;
top: 50%;
transform: translateY(-50%);
}

.accordion-section-title:hover span.dashicons.dashicons-arrow-down,
.nav-menus-php .metabox-holder .accordion-section-title:hover span.dashicons.dashicons-arrow-down {
color: #1d2327;
}

.accordion-section-title span.dashicons.dashicons-arrow-down::before,
.nav-menus-php .metabox-holder .accordion-section-title span.dashicons.dashicons-arrow-down::before {
position: relative;
left: -1px;
}

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

#templateside ul li a {
Expand Down Expand Up @@ -3648,7 +3665,6 @@ img {

.accordion-section-title {
margin: 0;
padding: 12px 15px 15px;
position: relative;
border-left: 1px solid #dcdcde;
border-right: 1px solid #dcdcde;
Expand Down
3 changes: 2 additions & 1 deletion src/wp-admin/css/customize-controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ body.trashing #publish-settings {
border-right: none;
border-bottom: none;
cursor: default;
padding: 10px 10px 11px 14px;
}

#customize-controls .customize-info.open .accordion-section-title:after,
Expand Down Expand Up @@ -1727,7 +1728,7 @@ p.customize-section-description {
border-left: none;
border-right: none;
margin: 0 0 15px;
padding-right: 100px; /* Space for the button */
padding: 12px 100px 15px 15px; /* Space for the button */
}

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

0 comments on commit b5b4e3a

Please sign in to comment.