I want to increase the width of the expanded sidebar in the WP customizer.
The relevant customizer markup:
<div class="wp-full-overlay expanded preview-desktop">
<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
<div id="customize-preview" class="wp-full-overlay-main">
The CSS:
.wp-full-overlay.expanded {
margin-left: 300px;
}
.wp-full-overlay-sidebar {
width: 300px;
}
.wp-full-overlay-main {
right: auto;
width: 100%;
I tried it with this CSS in my childtheme´s style.css
.wp-full-overlay.expanded {
margin-left: 500px !important;
}
#customize-controls.wp-full-overlay-sidebar {
width: 500px !important;
}
and these lines of JS in an enqueued scripts.js
jQuery(document).ready(function( $ ) {
$(".wp-full-overlay.expanded").css("marginLeft", "500px");
$(".wp-full-overlay-sidebar").css("width", "500px");
});
but it does not work.