123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- $left-sidebar-width: 300px;
- $textbook-page-max-width: 950px;
- $right-sidebar-width: 220px;
- $topbar-height: 60px;
- .c-textbook {
-
- position: relative;
- height: 100vh;
- overflow: hidden;
- margin: 0 0 0 auto;
- }
- .c-topbar {
- background-color: $book-background-color;
- position: fixed;
- top: 0;
- height: $topbar-height;
- width: 100%;
- left: 0;
- padding: $spacing-unit-small $spacing-unit-small 0 $spacing-unit-med * 2;
- z-index: 1;
- transition: top 250ms, transform 250ms ease;
- }
- @include mq($until: tablet) {
- .c-topbar.hidetop {
-
- top: -250px;
- }
- }
- .c-textbook__sidebar,
- .c-textbook__page {
-
- height: 100vh;
- overflow: auto;
- position: fixed;
- background-color: $book-background-color;;
- }
- .c-textbook__sidebar {
- width: $left-sidebar-width;
- top: 0;
- left: 0;
- }
- .c-textbook__page {
- width: $textbook-page-width;
- transition: transform 250ms ease;
- left: 0;
- padding: 0 $spacing-unit $spacing-unit-small $spacing-unit-small * 3;
- overflow-x: visible;
- @include mq($from: laptop) {
-
- padding-right: calc(100% - #{$left-sidebar-width} - #{$textbook-page-max-width});
- }
- &:focus {
-
- outline: none;
- }
- }
- .sidebar__right {
-
- display: none;
-
- width: $right-sidebar-width - $spacing-unit-small;
- position: relative;
- float: right;
- z-index: 1;
- @include mq($from: tablet) {
-
- display: block;
- }
- }
- .js-show-sidebar {
- .c-textbook__page, .c-topbar {
-
- transform: translate($left-sidebar-width, 0);
- @include mq($from: tablet) {
-
- width: calc(100% - #{$left-sidebar-width});
- }
- }
- }
- .c-textbook__content {
- clear: both;
- padding-top: $topbar-height * 1.5;
- width: 95%;
- }
- .c-page__nav {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding-top: 30px;
- }
- .footer, .c-page__nav {
- @include mq($from: laptop) {
- width: $textbook-page-with-sidebar-width;
- }
- }
- ::-webkit-scrollbar {
- width: 5px;
- background: #f1f1f1;
- }
- ::-webkit-scrollbar-thumb {
- background: #c1c1c1;
- }
- main, nav {
- scrollbar-width: thin;
- }
|