Help with twig syntax

Hi, I’d like to use the twig engine in our custom emails. Specifically, where a slot has no content that slot and its corresponding area (

, , , etc.) should not display as an empty space. Empty template areas are unattractive and I’d like to place a conditional on a ALL my slots for layout attractiveness and flexibility.



I’m sure this is incorrect. Can somebody please assist with the proper syntax to do this please?
Code:
{% if slots:content is not empty %}
<?php $view['slots']->output('content'); ?>
{% endif %}