aboutsummaryrefslogtreecommitdiff
path: root/assets/_main.scss
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-01-24 00:07:47 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-01-24 00:07:56 +0100
commitba5d38ad4427bcda21a4cc57689464ed58d8b9a0 (patch)
tree12964eb240f749baa7276369265c89a04765d14e /assets/_main.scss
parent2acd6ab280390057bf6d68a801a1be0f09dbd0b9 (diff)
Rework of main template, adds options for more fine customisation
Diffstat (limited to 'assets/_main.scss')
-rw-r--r--assets/_main.scss43
1 files changed, 18 insertions, 25 deletions
diff --git a/assets/_main.scss b/assets/_main.scss
index 03bc298..1be9960 100644
--- a/assets/_main.scss
+++ b/assets/_main.scss
@@ -47,11 +47,6 @@ img {
vertical-align: baseline;
}
-main {
- display: flex;
- flex-direction: row-reverse;
-}
-
aside nav ul {
padding: 0;
margin: 0;
@@ -162,8 +157,12 @@ ul.pagination {
}
.book-header {
- margin-bottom: $padding-16;
display: none;
+ margin-bottom: $padding-16;
+
+ label {
+ line-height: 0;
+ }
}
.book-search {
@@ -230,7 +229,6 @@ ul.pagination {
}
.book-footer {
- display: flex;
padding-top: $padding-16;
font-size: $font-size-14;
@@ -272,7 +270,7 @@ ul.pagination {
}
img {
- opacity: .1;
+ opacity: 0.1;
}
li.active img {
@@ -298,46 +296,41 @@ ul.pagination {
// Responsive styles
aside nav,
.book-page,
+.book-header aside,
.markdown {
transition: 0.2s ease-in-out;
transition-property: transform, margin, opacity;
will-change: transform, margin;
}
-@media screen and (max-width: $md-breakpoint) {
+@media screen and (max-width: $mobile-breakpoint) {
.book-menu {
margin-left: -$menu-width;
font-size: $font-size-base;
}
+
.book-toc {
- margin-right: -$toc-width;
- font-size: $font-size-base;
+ display: none;
}
.book-header {
- display: flex;
+ display: block;
}
- #menu-control:checked ~ main {
- .book-menu #BookMenu,
+ #menu-control:checked + main {
+ .book-menu nav,
.book-page {
transform: translateX($menu-width);
}
+
+ .book-header aside,
.markdown {
opacity: 0.25;
}
- .book-header #menu-control {
- transform: rotate(90deg);
- }
}
- #toc-control:checked ~ main {
- aside #TableOfContents,
- .book-page {
- transform: translateX(-$menu-width);
- }
- .markdown {
- opacity: 0.25;
- }
+
+ #toc-control:checked + aside {
+ display: block;
}
}