Bricks Version: 1.4beta
Hi @thomas and @timmse and all,
Sorry to interrupt again but IMHO there’s still something wrong with new container and content settings and behaviour.
(Or maybe we simply need more use cases and examples…)
First issue: root vs root+inner
Imagine I set some root container padding in theme settings, to prevent content from touching the edges of the screen (I guess a lot of people do this).
Then on all the website I’ll have to use either:
- only root container (no inner container)
- only root container and inner container
Because if I use BOTH solutions, content will not be correctly aligned between simple root containers and double containers (root+inner) because of the padding:
And I can’t set horizontal padding to zero for single root container, since for smaller screens, content will reach the edges:
So why not force people to use always root+inner, which is the more flexible anyway (since you can add section background later on without refactoring your sections) and set root container default width to 100% and root > inner to some defaut content width with a theme setting? (A bit like Oxygen.)
It would be easier to set for users (less clicks, no manual settings), things would be more consistent on the website and for a dev team, on all websites!
Second issue: content width
It seems content width setting overrides root containers width, so we can’t use sections background anylonger with custom content width.
#brx-content > * {
width: 1400px;
}
So we need to manually stretch root containers if we need backgrounds.
But then, content width doesn’t apply to inner container so it break alignment again:
So, what is the real actual use of content width?
If the purpose is real content width, it shouldn’t apply to root container but only inner containers, and if the purpose is to box all content, it should apply to root container as well.
In both cases, everything would be aligned and consistent.
Third issue: the missing simple div element
I can understand the “container” thing and I find it very flexible in theory, but it assumes it is used for section layout only.
And now we miss the most basic HTML element with no default width: the simple div.
I use it a lot to group elements like icon+text or horizontal buttons, to box things in a template, and surely a lot of other use cases.
But we need a container element with no 100% or other default width, just a container, like a div.
Conclusion
So my understanding of all this is that if you want a single container element that will be used BOTH for simple container (div) or more complex container like section (root+inner), I guess it will need some default settings adjustments like:
- default width auto when not root or inner (used as a generic div)
- default width 100% or theme setting content width when inner (used as section inner)
- default width 100% for root (used as section root)
Then with section as root+inner, root padding will never interfere with content alignment, content will never reach the edges (thanks to root padding), and we won’t have to manually set auto width for the div use.
But it will still be limitating since we won’t be able to use a simple div at rool level for layout purpose like main+sidebar or horizontal content, or box nested sections (root+inner) because they won’t have the root class, so I would be in favor of an actual new simple div element to complement containers.
Thanks for reading and for your understanding, because I know all this is biased by my personal use of sections/divs/content/width…