@import 'variables';
@import 'markdown';
html {
font-size: $font-size-base;
}
html, body {
min-width: $body-min-width;
overflow: hidden auto;
}
body {
color: $body-font-color;
background: $body-background;
font-family: 'Roboto', sans-serif;
font-weight: $body-font-weight;
box-sizing: border-box;
* {
box-sizing: inherit;
}
}
a {
text-decoration: none;
color: $color-link;
&:visited {
color: $color-visited-link;
}
}
nav {
ul {
margin: 0;
padding-left: $padding-16;
list-style: none;
line-height: $padding-16 * 2;
li {
a {
display: block;
}
a:hover {
opacity: .5;
}
img {
height: $padding-16;
}
}
}
&> ul {
// padding start with second level
padding-left: 0;
}
}
.header {
display: none;
align-items: center;
justify-content: space-between;
margin-bottom: $padding-16;
}
.content {
max-width: $content-max-width;
margin: 0 auto;
display: flex;
flex-flow: row;
.menu nav, .page, .markdown {
transition: 0.2s ease-in-out;
transition-property: transform, margin-left, opacity;
will-change: transform, margin-left;
}
.menu {
flex: 0 0 $nav-menu-width;
nav {
position: fixed;
height: 100%;
width: $nav-menu-width;
overflow: hidden auto;
padding: $padding-16;
font-size: $font-size-14;
}
a {
color: $nav-link-color;
}
.section {
margin-bottom: $padding-16;
> a { font-weight: 700; }
> ul { padding-left: 0; }
}
}
.page {
flex: 1 0;
width: 0;
min-width: $body-min-width;
padding: $padding-16;
}
.toc {
flex: 0 0 $nav-menu-width;
nav {
padding: $padding-16;
font-size: $font-size-12;
> ul {
border-left: $padding-1 solid $gray-200;
}
}
ul {
line-height: $padding-16 * 1.5;
padding-left: $padding-8;
}
}
}
// Responsive styles
$menu-hide-point: $nav-menu-width + $body-min-width;
$toc-hide-point: $menu-hide-point + $nav-menu-width;
@media screen and (max-width: $toc-hide-point) {
.toc {
// margin-right: -$nav-menu-width;
display: none;
}
}
@media screen and (max-width: $menu-hide-point) {
.menu {
margin-left: -$nav-menu-width;
}
.header {
display: flex;
}
#menu-control:checked + .content {
.menu nav {
transform: translateX($nav-menu-width);
}
.page {
transform: translateX($nav-menu-width);
}
.header label {
transform: rotate(90deg);
}
.markdown {
opacity: .25;
}
}
}