hugo-book-theme/assets/book.scss

223 lines
3 KiB
SCSS
Raw Permalink Normal View History

2018-11-24 15:10:43 +01:00
@import "variables";
@import "markdown";
@import "utils";
2018-09-05 16:22:04 +02:00
html {
font-size: $font-size-base;
2018-11-24 15:10:43 +01:00
letter-spacing: 0.33px;
scroll-behavior: smooth;
2018-09-05 16:22:04 +02:00
}
2018-11-24 15:10:43 +01:00
html,
body {
2018-09-05 16:22:04 +02:00
min-width: $body-min-width;
overflow-x: hidden;
2018-09-05 16:22:04 +02:00
}
body {
2018-09-13 18:07:55 +02:00
color: $body-font-color;
background: $body-background;
2018-11-07 12:54:18 +01:00
2018-11-24 15:10:43 +01:00
font-family: "Oxygen", sans-serif;
font-weight: $body-font-weight;
2018-11-07 12:54:18 +01:00
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
* {
box-sizing: inherit;
}
2018-09-05 16:22:04 +02:00
}
2018-11-24 15:10:43 +01:00
h1,
h2,
h3,
h4,
h5 {
2018-09-28 01:12:07 +02:00
font-weight: 400;
}
a {
text-decoration: none;
color: $color-link;
2018-09-24 17:03:23 +02:00
&:visited {
color: $color-visited-link;
}
2018-09-05 16:22:04 +02:00
}
img {
vertical-align: middle;
}
aside nav ul {
2018-11-24 15:10:43 +01:00
padding: 0;
margin: 0;
list-style: none;
li {
margin: 1em 0;
}
a {
display: block;
}
2018-11-25 12:06:09 +01:00
a:hover {
opacity: .5;
}
ul {
padding-left: $padding-16;
2018-09-24 17:03:23 +02:00
}
2018-11-24 15:10:43 +01:00
}
ul.pagination {
display: flex;
justify-content: center;
.page-item a {
padding: $padding-16;
}
}
2018-11-24 15:10:43 +01:00
.container {
max-width: $container-max-width;
margin: 0 auto;
2018-09-24 17:03:23 +02:00
}
2018-11-24 15:10:43 +01:00
.book-brand {
margin-top: 0;
2018-09-05 16:22:04 +02:00
}
2018-11-24 15:10:43 +01:00
.book-menu {
flex: 0 0 $menu-width;
font-size: $font-size-14;
2018-11-24 15:10:43 +01:00
nav {
width: $menu-width;
padding: $padding-16;
2018-11-24 15:10:43 +01:00
@include fixed;
}
2018-09-05 16:22:04 +02:00
2018-11-25 13:30:25 +01:00
@include dark-links;
2018-11-24 15:10:43 +01:00
}
2018-09-05 16:22:04 +02:00
2018-11-24 15:10:43 +01:00
.book-page {
min-width: $body-min-width;
flex-grow: 1;
2018-11-24 15:10:43 +01:00
padding: $padding-16;
}
2018-09-24 17:03:23 +02:00
2018-11-24 15:10:43 +01:00
.book-header {
margin-bottom: $padding-16;
display: none;
}
2018-09-30 01:22:39 +02:00
2018-11-24 15:10:43 +01:00
.book-toc {
flex: 0 0 $toc-width;
font-size: $font-size-12;
2018-11-24 15:10:43 +01:00
nav {
width: $toc-width;
padding: $padding-16;
2018-09-28 01:12:07 +02:00
2018-11-24 15:10:43 +01:00
@include fixed;
}
2018-11-24 15:10:43 +01:00
nav > ul > li {
margin: 0;
}
2018-11-24 15:10:43 +01:00
}
2018-12-03 08:21:05 +01:00
.book-git-footer {
display: flex;
margin-top: $padding-16;
font-size: $font-size-14;
2018-12-03 08:21:05 +01:00
align-items: baseline;
img {
width: $font-size-14;
vertical-align: bottom;
2018-12-03 08:21:05 +01:00
}
}
2019-03-31 23:48:17 +02:00
.book-footer {
display: flex;
margin-top: $padding-16;
font-size: $font-size-14;
align-items: baseline;
img {
width: $font-size-14;
vertical-align: bottom;
}
}
2018-11-24 15:10:43 +01:00
.book-posts {
min-width: $body-min-width;
max-width: $sm-breakpoint;
flex-grow: 1;
2018-11-24 15:10:43 +01:00
padding: $padding-16;
2018-09-24 17:03:23 +02:00
article {
padding-bottom: $padding-16;
2018-09-05 16:22:04 +02:00
}
2018-09-24 17:03:23 +02:00
}
2018-09-05 16:22:04 +02:00
// Responsive styles
2018-11-24 15:10:43 +01:00
aside nav,
.book-page,
2019-01-24 23:30:31 +01:00
.book-posts,
2018-11-24 15:10:43 +01:00
.markdown {
transition: 0.2s ease-in-out;
transition-property: transform, margin-left, opacity;
will-change: transform, margin-left;
}
2018-11-24 15:10:43 +01:00
@media screen and (max-width: $md-breakpoint) {
.book-toc {
display: none;
2018-09-05 16:22:04 +02:00
}
}
2018-09-05 16:22:04 +02:00
2018-11-24 15:10:43 +01:00
@media screen and (max-width: $sm-breakpoint) {
.book-menu {
margin-left: -$menu-width;
}
2018-09-05 16:22:04 +02:00
2018-11-24 15:10:43 +01:00
.book-header {
display: flex;
2018-09-05 16:22:04 +02:00
}
2018-09-30 01:22:39 +02:00
#menu-control:checked + main {
2018-11-24 15:10:43 +01:00
.book-menu nav,
2019-01-24 23:30:31 +01:00
.book-page,
.book-posts {
2018-11-24 15:10:43 +01:00
transform: translateX($menu-width);
}
2018-11-24 15:10:43 +01:00
.book-header label {
transform: rotate(90deg);
}
.markdown {
2018-11-24 15:10:43 +01:00
opacity: 0.25;
}
2018-09-13 18:07:55 +02:00
}
2018-09-24 17:03:23 +02:00
}
// Extra space for big screens
2018-11-24 15:10:43 +01:00
@media screen and (min-width: $container-max-width) {
.book-page,
.book-menu nav,
.book-toc nav {
padding: $padding-16 * 2 $padding-16;
}
}
// Add custom defined styles
@import 'custom'