{block name='et-style-limit-height'}
    {$targetElement = $targetElement|default:''}
    {if $targetElement !== ''}
        {$targetElement = "{$targetElement}:not(.initializing):not(.initialized)"}
    {/if}
    {if isset($breakpointValues) && count($breakpointValues) > 0 && $targetElement !== ''}
        <style type="text/css">
            {if isset($breakpointValues.xs) && $breakpointValues.xs !== '' && $breakpointValues.xs != 0}
                @media (max-width: {$et_global.breakpoints.xsMax}px) {
                    {$targetElement} {
                        max-height: {$breakpointValues.xs}px;
                    }
                }
            {/if}
            {if isset($breakpointValues.sm) && $breakpointValues.sm !== '' && $breakpointValues.sm != 0}
                @media (min-width: {$et_global.breakpoints.smMin}px) and (max-width: {$et_global.breakpoints.smMax}px)  {
                    {$targetElement} {
                        max-height: {$breakpointValues.sm}px;
                    }
                }
            {/if}
            {if isset($breakpointValues.md) && $breakpointValues.md !== '' && $breakpointValues.md != 0}
                @media (min-width: {$et_global.breakpoints.mdMin}px) and (max-width: {$et_global.breakpoints.mdMax}px)  {
                    {$targetElement} {
                        max-height: {$breakpointValues.md}px;
                    }
                }
            {/if}
            {if isset($breakpointValues.lg) && $breakpointValues.lg !== '' && $breakpointValues.lg != 0}
                @media (min-width: {$et_global.breakpoints.lgMin}px) and (max-width: {$et_global.breakpoints.lgMax}px)  {
                    {$targetElement} {
                        max-height: {$breakpointValues.lg}px;
                    }
                }
            {/if}
            {if isset($breakpointValues.xl) && $breakpointValues.xl !== '' && $breakpointValues.xl != 0}
                @media (min-width: {$et_global.breakpoints.xlMin}px) {
                    {$targetElement} {
                        max-height: {$breakpointValues.xl}px;
                    }
                }
            {/if}
        </style>
    {/if}
{/block}