hugo-book-theme/assets/styles.scss
2018-09-24 17:03:23 +02:00

170 lines
2.3 KiB
SCSS

@import 'variables';
@import 'pure-extension';
@import 'markdown';
html {
font-size: $font-size-base;
}
html, body {
width: 100%;
min-height: 100%;
min-width: $body-min-width;
}
body {
color: $body-font-color;
background: $body-background;
}
a {
text-decoration: none;
color: $color-link;
&:visited {
color: $color-visited-link;
}
}
ul {
margin: 0;
padding-left: $padding-16;
line-height: $padding-16 * 2;
li {
a {
display: block;
}
img {
height: $padding-16;
}
}
}
.header {
position: fixed;
width: 100%;
height: $header-height;
padding: $padding-16;
top: 0;
box-sizing: border-box;
z-index: 1;
background: $body-background;
@include shadow;
display: flex;
align-items: center;
label {
line-height: 0;
margin-right: $padding-16;
display: none;
}
h3 {
font-weight: 400;
line-height: 1.5rem;
margin: 0;
a {
color: $nav-link-color;
}
}
}
.menu {
position: fixed;
width: $nav-menu-width;
top: $header-height;
bottom: 0;
box-sizing: border-box;
padding: $padding-16;
background: $nav-background;
overflow-x: hidden;
overflow-y: auto;
transition: transform 0.3s ease-in-out;
will-change: transform;
font-size: $font-size-14;
line-height: 2rem;
a {
display: block;
color: $nav-link-color;
&.active {
color: $color-link;
}
}
ul {
list-style: none;
}
// No padding for first level
> ul {
padding: 0;
}
// Move content
+ div {
margin-left: $nav-menu-width;
margin-top: $header-height;
}
.root-section {
margin-bottom: $padding-16;
> a { font-weight: 600; }
> ul { padding-left: 0; }
}
}
.content {
margin: 0 auto;
max-width: $content-max-width;
min-width: $content-min-width;
.page {
overflow: hidden;
}
.toc {
font-size: $font-size-12;
nav > ul {
border-left: $padding-1 solid $gray-100;
}
ul {
list-style: none;
padding-left: $padding-8;
line-height: $padding-16 * 1.5;
}
}
}
// Mobile styles
@media screen and (max-width: 50rem) {
.header label {
display: inline-block;
}
.menu {
transform: translateX(-$nav-menu-width);
+ div {
margin-left: 0;
}
}
#nav-control:checked + nav {
@include shadow;
transform: translateX(0);
}
}