DAC of Design Action
5/12/2017 - 11:25 PM

Add top margin in sticky headers for admin bar

Add top margin in sticky headers for admin bar

## Purpose
Add top margin on sticky headers if admin bar is active.

## Installation
Include both pieces of sass code into the respective files. 

## Use
Simply include the mixin to the fixed element.
.navbar-fixed-top {
	@include admin-sticky-fix();
}
// handle sticky headers and admin bar
@mixin admin-sticky-fix( $offset: 0 ) {
  $narrow-offset: 46px;
  $wide-offset: 32px;
  @if $offset != 0 and type-of($offset) == 'number' {
    $narrow-offset: $narrow-offset + $offset;
    $wide-offset: $wide-offset + $offset;
  }
  .admin-bar & {
    top: $narrow-offset;
    @media screen and (min-width: 783px) {
      top: $wide-offset;
    }
  }
}