Created
August 22, 2023 08:58
-
-
Save idokd/fbc584f792803b437c0c982ab56b37a6 to your computer and use it in GitHub Desktop.
WordPress Admin Customizer Controls Side-bar width size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'customize_controls_print_styles', function() { | |
// TODO: consider max-width for the sidebar size | |
echo '<style> | |
body { | |
--site-width-size: 1280px; | |
--site-width-customizer-extra: 80px; | |
} | |
.wp-full-overlay.expanded { | |
margin-left: calc( 100vw - var( --site-width-size ) - var( --site-width-customizer-extra ) ); | |
} | |
#customize-controls.wp-full-overlay-sidebar { | |
width: calc( 100vw - var( --site-width-size ) - var( --site-width-customizer-extra ) ); | |
} | |
</style>'; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment