Skip to content

Instantly share code, notes, and snippets.

@JoelEadeDesign
Last active August 14, 2024 06:25
Show Gist options
  • Save JoelEadeDesign/5fd729dcde97b33c8957e7b17a5a648b to your computer and use it in GitHub Desktop.
Save JoelEadeDesign/5fd729dcde97b33c8957e7b17a5a648b to your computer and use it in GitHub Desktop.
Elementor Device Preview Width iPhone 14 (393x852px)
/**
* Elementor Device Preview Sizes
*
* @return void
*/
function add_custom_elementor_editor_css() {
if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) {
echo '<style>
/* iPhone 14 – smallest viewport the responsive preview can be */
#elementor-preview-responsive-wrapper {
min-width: 393px;
min-height: 852px;
}
</style>';
}
}
add_action( 'elementor/editor/after_enqueue_styles', 'add_custom_elementor_editor_css' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment