phgDigital / Project

1 stars 1 forks source link

Sidebar position classes need some work #26

Closed chrisblakley closed 7 years ago

chrisblakley commented 7 years ago

If the sidebar is on the left, it should not have the offset-md-1 class. Also, either the main content column should either then be col-md-9 or get a offset-md-1 class itself.

chrisblakley commented 7 years ago

Ok, I figured out a good fix for this:

<div class="row">
    <div class="col-md" role="main">
        Main content here
    </div>
    <div class="col-md-3 <?php echo ( get_theme_mod('sidebar_position') === 'left' )? 'flex-first' : 'offset-md-1'; ?>" role="complementary">
        Sidebar here
    </div>
</div>
chrisblakley commented 7 years ago

Updated sidebar expanders too:

//Nebula expandable sidebar subnav style defaults
a.toplevelvert_expander {position: absolute; top: 5px; right: 0; padding: 2px 10px !important;
    i {font-size: rem(18px); display: block; width: 100%; @include prefix((transform: rotate(-90deg))); @include prefix((transition: transform 0.25s));}
        &.closed i {@include prefix((transform: rotate(0deg)));}

    .flex-first & {right: auto; left: -30px;
        i {@include prefix((transform: rotate(270deg)));}
            &.closed i {@include prefix((transform: rotate(180deg)));}
    }
}