I’m working with the Quark theme, which has a grid-size variable in its blueprints. grid-size is applied to header, main content, and footer.
I’d like to make a change so that my header and footer can extend wider (grid-xl
) than the main content (grid-md
), but the base.html.twig references the same grid-size variable in all three places.
I know I can override the relevant block of the base.html.twig by using a template that extends it in my child theme. But I’m curious if there’s a high-precision method for overriding just this line
<section class="container {{ grid_size }}">
of the body block without copying and editing the whole body block to my child theme template.
The full block in base.html.twig in question is this:
{% block body %}
<section id="body-wrapper" class="section">
<section class="container {{ grid_size }}">
{% block messages %}
{% include 'partials/messages.html.twig' ignore missing %}
{% endblock %}
{{ block('content_surround') }}
</section>
</section>
{% endblock %}
Any thoughts? Perhaps it’s unnecessary, but I thought a more precise method might make my child theme more update-proof.