/* CSS for UI elements (a.k.a. chrome) */ @import 'variables.css'; #mdbook { position: relative; scrollbar-color: var(--scrollbar) var(--bg); } #mdbook .content { position: relative; } #searchresults a, #mdbook .content a:link, #mdbook a:visited, #mdbook a > .hljs { color: var(--links); } /* body-container is necessary because mobile browsers don't seem to like overflow-x on the body tag when there is a tag. */ #mdbook .flex__content { /* This is used when the sidebar pushes the body content off the side of the screen on small screens. Without it, dragging on mobile Safari will want to reposition the viewport in a weird way. */ overflow-x: clip; } /* Menu Bar */ #menu-bar, #menu-bar-hover-placeholder { z-index: 101; margin: auto calc(0px - var(--page-padding)); } #menu-bar { position: relative; display: flex; flex-wrap: wrap; background-color: var(--bg); border-block-end: 0; } #menu-bar.sticky, .js #menu-bar-hover-placeholder:hover + #menu-bar, .js #menu-bar:hover, .js.sidebar-visible #menu-bar { position: -webkit-sticky; position: sticky; top: 0 !important; } #menu-bar-hover-placeholder { position: sticky; position: -webkit-sticky; top: 0; height: var(--menu-bar-height); } #menu-bar.bordered { border-block-end-color: var(--table-border-color); } #menu-bar i, #menu-bar .icon-button { position: relative; padding: 0 8px; z-index: 10; line-height: var(--menu-bar-height); cursor: pointer; transition: color 0.5s; } @media only screen and (max-width: 420px) { #menu-bar i, #menu-bar .icon-button { padding: 0 5px; } } #mdbook .icon-button { border: none; background: none; padding: 0; color: inherit; } #mdbook .icon-button i { margin: 0; } #mdbook .right-buttons { margin: 0 15px; } #mdbook .right-buttons a { text-decoration: none; } #mdbook .left-buttons { display: flex; margin: 0 5px; } .no-js #mdbook .left-buttons button { display: none; } #mdbook .menu-title { display: inline-block; font-weight: 200; font-size: 1.8rem; line-height: var(--menu-bar-height); text-align: center; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .js #mdbook .menu-title { cursor: pointer; } @media only screen and (max-width: 640px) { #mdbook .menu-title { font-size: 1.5rem; } } @media only screen and (max-width: 420px) { #mdbook .menu-title { font-size: 1.2rem; } } #mdbook .menu-bar, #mdbook .menu-bar:visited, #mdbook .nav-chapters, #mdbook .nav-chapters:visited, #mdbook .mobile-nav-chapters, #mdbook .mobile-nav-chapters:visited, #mdbook .menu-bar .icon-button, #mdbook .menu-bar a i { color: var(--icons); } #mdbook .menu-bar i:hover, #mdbook .menu-bar .icon-button:hover, #mdbook .nav-chapters:hover, #mdbook .mobile-nav-chapters i:hover { color: var(--icons-hover); } /* Nav Icons */ #mdbook .nav-chapters { font-size: 2.5em; text-align: center; text-decoration: none; position: absolute; top: 0; bottom: 0; margin: 1rem; max-width: 150px; min-width: 90px; transition: color 0.5s, background-color 0.5s; } #mdbook .nav-chapters > i.fa { display: block; padding: 50px 0; visibility: hidden; } #mdbook .nav-chapters:hover { text-decoration: none; background-color: var(--theme-hover); transition: background-color 0.15s, color 0.15s; } #mdbook .nav-wrapper { margin-block-start: 50px; display: none; } #mdbook .mobile-nav-chapters { font-size: 2.5em; text-align: center; text-decoration: none; width: 90px; border-radius: 5px; background-color: var(--sidebar-bg); } /* Only Firefox supports flow-relative values */ #mdbook .previous { float: left; } [dir=rtl] #mdbook .previous { float: right; } /* Only Firefox supports flow-relative values */ #mdbook .next { float: right; right: var(--page-padding); } [dir=rtl] #mdbook .next { float: left; right: unset; left: var(--page-padding); } /* Use the correct buttons for RTL layouts*/ [dir=rtl] #mdbook .previous i.fa-angle-left:before { content:"\f105"; } [dir=rtl] #mdbook .next i.fa-angle-right:before { content:"\f104"; } @media only screen and (max-width: 1080px) { #mdbook .nav-wide-wrapper { display: none; } #mdbook .nav-wrapper { display: block; } } /* sidebar-visible */ @media only screen and (max-width: 1380px) { #sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wide-wrapper { display: none; } #sidebar-toggle-anchor:checked ~ .page-wrapper .nav-wrapper { display: block; } } /* Inline code */ #mdbook :not(pre) > .hljs { display: inline; padding: 0.1em 0.3em; border-radius: 3px; } #mdbook :not(pre):not(a) > .hljs { color: var(--inline-code-color); overflow-x: initial; } #mdbook a:hover > .hljs { text-decoration: underline; } #mdbook pre { position: relative; } #mdbook pre > .buttons { position: absolute; z-index: 100; right: 0px; top: 2px; margin: 0px; padding: 2px 0px; color: var(--sidebar-fg); cursor: pointer; visibility: hidden; opacity: 0; transition: visibility 0.1s linear, opacity 0.1s linear; } #mdbook pre:hover > .buttons { visibility: visible; opacity: 1 } #mdbook pre > .buttons :hover { color: var(--sidebar-active); border-color: var(--icons-hover); background-color: var(--theme-hover); } #mdbook pre > .buttons i { margin-inline-start: 8px; } #mdbook pre > .buttons button { cursor: inherit; margin: 0px 5px; padding: 3px 5px; font-size: 14px; border-style: solid; border-width: 1px; border-radius: 4px; border-color: var(--icons); background-color: var(--theme-popup-bg); transition: 100ms; transition-property: color,border-color,background-color; color: var(--icons); } @media (pointer: coarse) { #mdbook pre > .buttons button { /* On mobile, make it easier to tap buttons. */ padding: 0.3rem 1rem; } #mdbook .sidebar-resize-indicator { /* Hide resize indicator on devices with limited accuracy */ display: none; } } #mdbook pre > code { display: block; padding: 1rem; } /* FIXME: ACE editors overlap their buttons because ACE does absolute positioning within the code block which breaks padding. The only solution I can think of is to move the padding to the outer pre tag (or insert a div wrapper), but that would require fixing a whole bunch of CSS rules. */ #mdbook .hljs.ace_editor { padding: 0rem 0rem; } #mdbook pre > .result { margin-block-start: 10px; } /* Search */ #searchresults a { text-decoration: none; } #mdbook mark { border-radius: 2px; padding-block-start: 0; padding-block-end: 1px; padding-inline-start: 3px; padding-inline-end: 3px; margin-block-start: 0; margin-block-end: -1px; margin-inline-start: -3px; margin-inline-end: -3px; background-color: var(--search-mark-bg); transition: background-color 300ms linear; cursor: pointer; } #mdbook mark.fade-out { background-color: rgba(0,0,0,0) !important; cursor: auto; } #mdbook .searchbar-outer { margin-inline-start: auto; margin-inline-end: auto; max-width: var(--content-max-width); } #searchbar { width: 100%; margin-block-start: 5px; margin-block-end: 0; margin-inline-start: auto; margin-inline-end: auto; padding: 10px 16px; transition: box-shadow 300ms ease-in-out; border: 1px solid var(--searchbar-border-color); border-radius: 3px; background-color: var(--searchbar-bg); color: var(--searchbar-fg); } #searchbar:focus, #searchbar.active { box-shadow: 0 0 3px var(--searchbar-shadow-color); } #mdbook .searchresults-header { font-weight: bold; font-size: 1em; padding-block-start: 18px; padding-block-end: 0; padding-inline-start: 5px; padding-inline-end: 0; color: var(--searchresults-header-fg); } #mdbook .searchresults-outer { margin-inline-start: auto; margin-inline-end: auto; max-width: var(--content-max-width); border-block-end: 1px dashed var(--searchresults-border-color); } #mdbook ul#searchresults { list-style: none; padding-inline-start: 20px; } #mdbook ul#searchresults li { margin: 10px 0px; padding: 2px; border-radius: 2px; } #mdbook ul#searchresults li.focus { background-color: var(--searchresults-li-bg); } #mdbook ul#searchresults span.teaser { display: block; clear: both; margin-block-start: 5px; margin-block-end: 0; margin-inline-start: 20px; margin-inline-end: 0; font-size: 0.8em; } #mdbook ul#searchresults span.teaser em { font-weight: bold; font-style: normal; } /* Sidebar */ #mdbook .sidebar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--sidebar-width); font-size: 0.875em; box-sizing: border-box; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; background-color: var(--sidebar-bg); color: var(--sidebar-fg); } [dir=rtl] #mdbook .sidebar { left: unset; right: 0; } #mdbook .sidebar-resizing { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .no-js #mdbook .sidebar, .js:not(.sidebar-resizing) #mdbook .sidebar { transition: transform 0.3s; /* Animation: slide away */ } #mdbook .sidebar code { line-height: 2em; } #mdbook .sidebar .sidebar-scrollbox { overflow-y: auto; position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding: 10px 10px; } #mdbook .sidebar .sidebar-resize-handle { position: absolute; cursor: col-resize; width: 0; right: calc(var(--sidebar-resize-indicator-width) * -1); top: 0; bottom: 0; display: flex; align-items: center; } #mdbook .sidebar-resize-handle .sidebar-resize-indicator { width: 100%; height: 30px; background-color: var(--icons); margin-inline-start: var(--sidebar-resize-indicator-space); } [dir=rtl] #mdbook .sidebar .sidebar-resize-handle { left: calc(var(--sidebar-resize-indicator-width) * -1); right: unset; } .js #mdbook .sidebar .sidebar-resize-handle { cursor: col-resize; width: calc(var(--sidebar-resize-indicator-width) - var(--sidebar-resize-indicator-space)); } /* sidebar-hidden */ #sidebar-toggle-anchor:not(:checked) ~ .sidebar { transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width))); z-index: -1; } [dir=rtl] #sidebar-toggle-anchor:not(:checked) ~ .sidebar { transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width))); } #mdbook .sidebar::-webkit-scrollbar { background: var(--sidebar-bg); } #mdbook .sidebar::-webkit-scrollbar-thumb { background: var(--scrollbar); } /* sidebar-visible */ #sidebar-toggle-anchor:checked ~ .page-wrapper { transform: translateX(calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width))); } [dir=rtl] #sidebar-toggle-anchor:checked ~ .page-wrapper { transform: translateX(calc(0px - var(--sidebar-width) - var(--sidebar-resize-indicator-width))); } @media only screen and (min-width: 620px) { #sidebar-toggle-anchor:checked ~ .page-wrapper { transform: none; margin-inline-start: calc(var(--sidebar-width) + var(--sidebar-resize-indicator-width)); } [dir=rtl] #sidebar-toggle-anchor:checked ~ .page-wrapper { transform: none; } } #mdbook .chapter { list-style: none outside none; padding-inline-start: 0; line-height: 2.2em; } #mdbook .chapter ol { width: 100%; } #mdbook .chapter li { display: flex; color: var(--sidebar-non-existant); } #mdbook .chapter li a { display: block; padding: 0; text-decoration: none; color: var(--sidebar-fg); } #mdbook .chapter li a:hover { color: var(--sidebar-active); } #mdbook .chapter li a.active { color: var(--sidebar-active); } #mdbook .chapter li > a.toggle { cursor: pointer; display: block; margin-inline-start: auto; padding: 0 10px; user-select: none; opacity: 0.68; } #mdbook .chapter li > a.toggle div { transition: transform 0.5s; } /* collapse the section */ #mdbook .chapter li:not(.expanded) + li > ol { display: none; } #mdbook .chapter li.chapter-item { line-height: 1.5em; margin-block-start: 0.6em; } #mdbook .chapter li.expanded > a.toggle div { transform: rotate(90deg); } #mdbook .spacer { width: 100%; height: 3px; margin: 5px 0px; } #mdbook .chapter .spacer { background-color: var(--sidebar-spacer); } @media (-moz-touch-enabled: 1), (pointer: coarse) { #mdbook .chapter li a { padding: 5px 0; } #mdbook .spacer { margin: 10px 0; } } #mdbook .section { list-style: none outside none; padding-inline-start: 20px; line-height: 1.9em; } /* Theme Menu Popup */ #mdbook .theme-popup { position: absolute; left: 10px; top: var(--menu-bar-height); z-index: 1000; border-radius: 4px; font-size: 0.7em; color: var(--fg); background: var(--theme-popup-bg); border: 1px solid var(--theme-popup-border); margin: 0; padding: 0; list-style: none; display: none; /* Don't let the children's background extend past the rounded corners. */ overflow: hidden; } [dir=rtl] #mdbook .theme-popup { left: unset; right: 10px; } #mdbook .theme-popup .default { color: var(--icons); } #mdbook .theme-popup .theme { width: 100%; border: 0; margin: 0; padding: 2px 20px; line-height: 25px; white-space: nowrap; text-align: start; cursor: pointer; color: inherit; background: inherit; font-size: inherit; } #mdbook .theme-popup .theme:hover { background-color: var(--theme-hover); } #mdbook .theme-selected::before { display: inline-block; content: "✓"; margin-inline-start: -14px; width: 14px; }