Basic Bootstrap + Matrix Implementation
Why not use:

{% if block.sidebar|length %}
    &lt;div class="col-sm-8"&gt;
{% else %}
    &lt;div class="col-sm-12"&gt;
{% endif %}


This way the column will automatically be smaller IF the side bar exists.