I have a website that adds classes to the body tag when menus are open. There is a right menu and a left menu. When both are open, it’s causing some width issues with my central column. I am trying to get a parent class that does something like this:
When left-menu and right-menu classes are in the body tag, then I want to change central-column.
I can’t get it to work because left-menu and right-menu are at the same parent level, they are not nested. So, when I have both classes specified, it fails because I can’t find a way to specify two things that are equal and not in a cascade.
.left-menu .right-menu .central-column {margin: 0 !important;}
That does not work, but I can specify when one of the menus are open, for example these all work:
.left-menu .central-column,
.right-menu .central-column {margin: 0 !important;}
I tried things like this and none worked.
.left-menu .right-menu {.central-column {margin: 0 !important;}}
.left-menu & .right-menu .central-column {margin: 0 !important;}
body[class="left-menu"][class="right-menu"] .central-column {margin: 0 !important;}
body[attr="left-menu"][class="right-menu"] .central-column {margin: 0 !important;}
Can anyone help with this?