- Issue created by @milos.kroulik
- @miloskroulik opened merge request.
It looks like the logic is wrong when setting up layout with complementary in src/Plugin/Preprocess/Page.php:176
:
// Check if sidebars are empty.
if (empty($variables['page']['sidebar_first']) && empty($variables['page']['sidebar_second'])) {
$attributes->addClass('layout--with-complementary');
}
This unnecessarily restricts with of the main content to 66.7 % even when there isn't any block in any of the sidebar regions. I believe it should be set like this, so that layout--with-complementary
class is set when one of the sidebars isn't empty:
// Check if sidebars are empty.
if (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) {
$attributes->addClass('layout--with-complementary');
}
I will create a MR with this change shortly.
Active
2.4
Code