[Resolved] Should first-child and last-child margins be restored on mobile?

Home Forums Support Should first-child and last-child margins be restored on mobile?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1123323
    Nik

    Just a suggestion here – could be totally wrong! I’m using a menu widget in the footer bar and by default, GP strips the left margin of the first child and the right margin of the last, exactly as you’d want.

    But on mobile, when the menu items drop to a second or third row, those same tweaks knock off the balance because two of the items are effectively not centred. I can reinstate them with CSS of course but I was wondering if this could/should be done in the theme by default?

    Or are there other implications that I’ve missed?

    Keep up the good work!

    https://cl.ly/67bd5ed96d80

    #1123761
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Nice catch! I’ll get this added in 2.5.0 πŸ™‚

    For now, you can use this:

    @media (max-width: 768px) {
        .footer-bar .widget_nav_menu li:first-child {
            margin-left: 10px;
        }
    
        .footer-bar .widget_nav_menu li:last-child {
            margin-right: 10px;
        }
    }

    Thank you!

    #1124542
    Nik

    Ace! Thank you Tom. πŸ™‚

    #1124807
    Tom
    Lead Developer
    Lead Developer

    No problem! Thanks again for letting us know πŸ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.