[Support request] How to implement passepartout like TwentySixteen theme ?

Home Forums Support [Support request] How to implement passepartout like TwentySixteen theme ?

Home Forums Support How to implement passepartout like TwentySixteen theme ?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1415501
    Jacob

    Thank you for an awesome product.

    How to implement passepartout like TwentySixteen theme ?

    Thanks,

    Jacob

    #1415900
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    @media(min-width: 769px) {
        body {
            margin: 21px;
        }
    
        body:before,
        body:after {
            background: inherit;
            content: "";
            display: block;
            height: 21px;
            left: 0;
            position: fixed;
            width: 100%;
            z-index: 99;
        }
    
        body:before {
            top: 0;
        }
    
        body:after {
            bottom: 0;
        }
    }
    #1415914
    Jacob

    Wonderful. Except I have “Use navigation as header” turned on and “Sticky navigation” turned on also with no transition. When scrolling down this means the header-as-navigation jumps into full-screen-width and does not respect the passepartout. Is there something you can do ?

    #1415921
    David
    Staff
    Customer Support

    Not sure if there is a fix for that – can you link me to the site so i can see the issue ?
    Edit your original topic and use the Site URL field to share a link privately.

    #1474221
    Jacob

    Thank you, David.

    Sorry for the late reply.

    So. I managed to get a sticky header by the standard customization option. I also managed to get a sticky footer by adding an after_footer-hook with an element in it – https://generatepress.com/forums/topic/how-do-i-create-a-sticky-footer-bar/

    Now, in order to achieve what I am going for I need to add a 4px border in both sides of the page. Top and bottom is taken care of. So how do we do this ? Is page background-color and body padding the way to go ? Or what would you do ?

    Thank you.

    #1474234
    David
    Staff
    Customer Support

    Could you provide a login to the site so i can get past the maintenance mode – i only need to see the Front End.

    #1474248
    Jacob

    Maintenance off.

    #1474368
    David
    Staff
    Customer Support

    Try this CSS instead:

    body {
        margin: 40px;
    }
    body:before {
        content: '';
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width:  100%;
        height: 100%;
        border: 40px solid #000;
        pointer-events: none;
    }
    .sticky-enabled .main-navigation.is_stuck,
    .sticky-enabled #mobile-header.main-navigation.is_stuck {
        margin: 0 40px;
        top: 40px !important;
        width: calc(100% - 80px) !important;
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.