I think this should be:

    {% block extra_style %}{% endblock %}
    {% if branding_css != '' %}
    <style>{{branding_css}}</style>
    {% endif %}