XF 2.3 Sidebar widget background color?

shawn

Well-known member
In 2.2 and earlier releases, I used ".p-body-sidebar .block-container {....}" ".p-body-sidebar .block-minorHeader{..}", etc in extra.less to control the appearance of the sidebar widgets. How do I achieve the same result in 2.3+?

TIA
 
Something like this maybe. Have not tested this since I am not at nhome right now.

If you previously had:
Code:
.p-body-sidebar .block-container {
  background: #f5f5f5;
}
.p-body-sidebar .block-minorHeader {
  font-weight: bold;
}
You would now use:
Code:
.block--sidebar {
  background: #f5f5f5;
}
.block--sidebar .block-header {
  font-weight: bold;
}
Hope it helps.
 
Something like this maybe. Have not tested this since I am not at nhome right now.

If you previously had:
Code:
.p-body-sidebar .block-container {
  background: #f5f5f5;
}
.p-body-sidebar .block-minorHeader {
  font-weight: bold;
}
You would now use:
Code:
.block--sidebar {
  background: #f5f5f5;
}
.block--sidebar .block-header {
  font-weight: bold;
}
Hope it helps.
Thanks, but that's not quite it.

The code I had before looks like it ought to work based off the class names of the nested divs, but it's not coming through at all.
 
This works for me:

.p-body-sidebar .block .block-container { background: antiquewhite; }

This is the stock XenForo theme, however.

If it's a third party theme, it might not be the same. In PixelExit, it changes the color of the body of each widget, but not the header. So it'll require more modification to make that work.
 
Back
Top Bottom