.x-main .x-layout

is it correct that the new layout builder uses different class for the main part?

I sometimes use a CSS that should be applied to the entire content, not the header or footer. I reference this via the .x-main class. But the new layout builder now seems to set the class .x-layout, is that correct?

Should I use the role=“main” instead? Or does that clash with then other settings?

Yes! This is intentional because the x-main has styles that help the active stack style how sidebars work in the theme and we didn’t want those extra styles to be present when they’re not needed for Layouts. You can style off x-layout, the main tag, or [role="main"] perhaps. Another thing you could do is just add custom CSS in the Layout builder and those styles will only be added when the Layout is active.

So just for the record, with

.x-main, .x-layout
{
  css code ...
}

i should catch all stacks and layout builder main content?

And with

.x-container

the whole stack code if needed, correct?

Yes, that should do it!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.