Hi @Norm,
I have a separate request related to the HTML structure Blocs outputs for bric containers.
Reduce Extra Wrapper Levels Inside <bric_container>
Issue:
When a bric uses:
<bric_container></bric_container> and rows/columns (or other elements) are dropped inside it, Blocs currently injects multiple wrapper levels between <bric_container> and the actual dropped-in elements.
These additional wrappers can create styling and layout issues, especially when the dropped-in element is used as a query loop root (for example, a column being repeated). Common side effects include:
-
Unexpected flex / grid behavior
-
Difficulty targeting the loop root
-
Problems with height, spacing, and child selectors
Requested behavior
Ideally, <bric_container> would act as a pure container and introduce no wrapper of its own, so dropped elements become direct children of <bric_container>.
<bric_container>
<!-- dropped content -->
</bric_container>
Optional compromise (if internal wrappers are required)
If Blocs needs an internal wrapper for structural or editing reasons, a practical compromise would be:
-
Limit the output to a single wrapper max
-
Treat <bric_container> as the styling and targeting surface
-
Allow attributes on <bric_container>, such as:
-
class
-
id
-
inline style
-
possibly data-attributes
-
For example:
<bric_container class="loop-root" style="display:grid">
<div>
<!-- dropped content -->
</div>
</bric_container>
OR both if it made sense:
<bric_container class="loop-root" style="display:grid">
<!-- dropped content -->
</bric_container>
This would:
-
Make styling predictable
-
Allow clean loop targeting
-
Reduce reliance on descendant selectors
-
Avoid brittle CSS caused by unexpected wrapper depth
This change would significantly improve advanced layout control, especially for query-driven content.
Thanks again @Norm for all the hard work you put into Blocs, and your responsiveness to the blocs community needs.
Ricardo