// IE10&11 Flexbox fix @media all and (-ms-high-contrast:none) { html { display: flex; flex-direction: column; } } // app-dashboard and app-root are Angular2+ selectors. You can add here your own selectors if you need. .app, app-dashboard, app-root { display: flex; flex-direction: column; min-height: 100vh; } .app-header { flex: 0 0 $navbar-height; } .app-footer { flex: 0 0 $footer-height; } .app-body { display: flex; flex-direction: row; flex-grow: 1; overflow-x: hidden; .main { flex: 1; min-width: 0; } .sidebar { flex: 0 0 $sidebar-width; order: -1; } .aside-menu { flex: 0 0 $aside-menu-width; } } // // header // .header-fixed { .app-header { position: fixed; width: 100%; z-index: $zindex-sticky; } .app-body { margin-top: $navbar-height; } } // // Sidebar // .sidebar-hidden { .sidebar { margin-left: - $sidebar-width; } } .sidebar-fixed { .sidebar { height: calc(100vh - #{$navbar-height}); position: fixed; width: $sidebar-width; z-index: $zindex-sticky - 1; } .main, .app-footer { margin-left: $sidebar-width; } &.sidebar-hidden { .main, .app-footer { margin-left: 0; } } } .sidebar-off-canvas { .sidebar { height: calc(100vh - #{$navbar-height}); position: fixed; z-index: $zindex-sticky - 1; } } @include media-breakpoint-up(lg) { .sidebar-compact { .sidebar { flex: 0 0 $sidebar-compact-width; } &.sidebar-hidden { .sidebar { margin-left: - $sidebar-compact-width; } } &.sidebar-fixed { .main, .app-footer { margin-left: $sidebar-compact-width; } .sidebar { width: $sidebar-compact-width; } &.sidebar-hidden { .main, .app-footer { margin-left: 0; } } } .sidebar-minimizer { display: none; } } .sidebar-minimized { .sidebar { flex: 0 0 $sidebar-minimized-width; } &.sidebar-hidden { .sidebar { margin-left: - $sidebar-minimized-width; } } &.sidebar-fixed { .main, .app-footer { margin-left: $sidebar-minimized-width; } .sidebar { width: $sidebar-minimized-width; } &.sidebar-hidden { .main, .app-footer { margin-left: 0; } } } } } // // Aside Menu // .aside-menu-hidden { .aside-menu { margin-right: - $aside-menu-width; } } .aside-menu-fixed { .aside-menu { height: 100%; position: fixed; right: 0; .tab-content { height: calc(100vh - #{$aside-menu-nav-padding-y * 2 + $font-size-base} - #{$navbar-height}); } } .main, .app-footer { margin-right: $aside-menu-width; } &.aside-menu-hidden { .main, .app-footer { margin-right: 0; } } } .aside-menu-off-canvas { .aside-menu { height: 100%; position: fixed; right: 0; z-index: $zindex-sticky - 1; .tab-content { height: calc(100vh - #{$aside-menu-nav-padding-y * 2 + $font-size-base} - #{$navbar-height}); } } } // // Breadcrumb // .breadcrumb-fixed { .main { $breadcrumb-height: 2 * $breadcrumb-padding-y + $font-size-base + 1.5 * $spacer; padding-top: $breadcrumb-height; } .breadcrumb { left: 0; position: fixed; right: 0; top: $navbar-height; z-index: $zindex-sticky - 2; } // if sidebar + main + aside .main:nth-child(2) { .breadcrumb { left: $sidebar-width; right: $aside-menu-width; } } // if sidebar + main .main:first-child { .breadcrumb { left: 0; right: $aside-menu-width; } } // if main + aside .main:last-child { .breadcrumb { right: 0; } } &.sidebar-minimized { .main .breadcrumb { left: $sidebar-minimized-width; } } &.sidebar-hidden, &.sidebar-off-canvas { .main .breadcrumb { left: 0; } } &.aside-menu-hidden, &.aside-menu-off-canvas { .main .breadcrumb { right: 0; } } } // // Footer // .footer-fixed { .app-footer { bottom: 0; height: $footer-height; left: 0; position: fixed; right: 0; z-index: $zindex-sticky; } .app-body { margin-bottom: $footer-height; } } // // Animations // .app-header, .app-footer, .sidebar, .main, .aside-menu { transition: margin-left $layout-transition-speed, margin-right $layout-transition-speed, width $layout-transition-speed, flex $layout-transition-speed; } .sidebar-nav { transition: width $layout-transition-speed; } .breadcrumb { transition: left $layout-transition-speed, right $layout-transition-speed, width $layout-transition-speed; } // // Mobile layout // @include media-breakpoint-down(md) { .app-header.navbar { @include borders($navbar-brand-border); background-color: $navbar-brand-bg; position: fixed !important; text-align: center; width: 100%; z-index: $zindex-sticky; .navbar-toggler { @if (lightness( $navbar-brand-bg ) > 40) { color: $navbar-color; } @else { color: $white; } } .navbar-brand { left: 50%; margin-left: - ($navbar-brand-width / 2); position: absolute; } } .app-body { margin-top: $navbar-height; } .breadcrumb-fixed { .main:nth-child(2) .breadcrumb { left: auto; right: auto; width: 100%; } } .sidebar { height: calc(100vh - #{$navbar-height}); margin-left: - $mobile-sidebar-width; position: fixed; width: $mobile-sidebar-width; z-index: $zindex-sticky - 1; .sidebar-nav, .nav { min-height: calc(100vh - #{$navbar-height}); width: $mobile-sidebar-width; } .sidebar-minimizer { display: none; } } .main, .app-footer { margin-left: 0 !important; } .sidebar-hidden { .sidebar { margin-left: - $mobile-sidebar-width; } } .sidebar-mobile-show { .sidebar { margin-left: 0; width: $mobile-sidebar-width; } .main { margin-left: $mobile-sidebar-width !important; margin-right: - $mobile-sidebar-width !important; } } }