.header { // Make sure that .header and .main-inner are the same height // Required for .sidebar `position: sticky;` align-self: stretch; width: $sidebar-desktop; +desktop-large() { width: $sidebar-desktop; } +tablet-mobile() { width: auto; } } .header-inner { background: var(--content-bg-color); border-radius: $border-radius-inner; box-shadow: $box-shadow-inner; overflow: hidden; padding: 0; top: 0; width: $sidebar-desktop; +desktop-large() { width: $sidebar-desktop; } +tablet-mobile() { border-radius: initial; position: relative; width: auto; } } .main { align-items: flex-start; display: flex; justify-content: space-between; main-container(); if (hexo-config('sidebar.position') == 'right') { flex-direction: row-reverse; } +tablet-mobile() { display: block; width: auto; } } .main-inner { align-self: stretch; background: var(--content-bg-color); border-radius: $border-radius-inner; box-shadow: $box-shadow-inner; box-sizing: border-box; padding: $content-desktop-padding; width: $content-wrap; +tablet-mobile() { border-radius: initial; padding: 20px; width: 100%; } } .content { padding-top: 40px; } if (hexo-config('sidebar.position') == 'right') { .header-inner { right: 0; } .footer-inner { padding-right: $sidebar-desktop + $sidebar-offset; } } else { .footer-inner { padding-left: $sidebar-desktop + $sidebar-offset; } } .footer-inner { +tablet-mobile() { padding-left: 0; padding-right: 0; width: auto; } }