• Hi there

    I’m developing a plugin (using blocks) and am testing with popular themes (including yours, naturally!) and I think I’ve found a CSS issue.

    Essentially, your CSS (when adding a block widget to the sidebar) is removing margin-bottom from some of our internal containers.

    Take a block with markup like:

    <div>
        <h3>Hello World</h3>
    </div>

    The css is removing the margin bottom from from the <h3>.

    The rule I see being applied from main.css is:

    .sidebar .widget *:last-child, .footer-widgets .widget *:last-child {
        margin-bottom: 0;
    }

    This effectively targets any last-child, in any container no matter how nested it is, in the sidebar/widget.

    My guess is it should only target the last child that is a direct descendant of .widget:

    .sidebar .widget > *:last-child, .footer-widgets .widget > *:last-child {
        margin-bottom: 0;
    }

    Thanks

    • This topic was modified 2 years, 9 months ago by Code Amp.
    • This topic was modified 2 years, 9 months ago by Code Amp.
    • This topic was modified 2 years, 9 months ago by Code Amp.
Viewing 1 replies (of 1 total)
  • Hi there,

    yeah its legacy CSS, which although is something we would like to change, its a difficult change to make as it may adversely affect many sites.

    But its on our radar, and something we may address in a future.

    If you would like to raise an Issue on our GitHub then we can keep a track of it:

    https://github.com/tomusborne/generatepress/issues

Viewing 1 replies (of 1 total)
  • The topic ‘Hungry CSS in sidebar’ is closed to new replies.