diff --git a/css/playground.css b/css/playground.css index 38fffd1..44e56e0 100644 --- a/css/playground.css +++ b/css/playground.css @@ -1,275 +1,276 @@ -/* i32 and official */ -:root, body { - background-color: #0f1419; - background-image: none; - color: #c5c5c5; -} - -:root::before { - content: none; -} - -#configure-editor span { - background: url("data:image/svg+xml,%3C?xml version='1.0' standalone='no'?%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' version='1.1'%3E%3Cpath fill='%2375818e' stroke='%2375818e' stroke-width='1' d='M 7,0.5 6.5,1 6.5,3 6,3.5 5.5,3.5 4,2 3,2 2,3 2,4 3.5,5.5 3.5,6 3,6.5 1,6.5 0.5,7 l 0,2 0.5,0.5 2,0 0.5,0.5 0,0.5 -1.5,1.5 0,1 1,1 1,0 1.5,-1.5 0.5,0 0.5,0.5 0,2 0.5,0.5 2,0 0.5,-0.5 0,-2 0.5,-0.5 0.5,0 1.5,1.5 1,0 1,-1 0,-1 -1.5,-1.5 0,-0.5 0.5,-0.5 2,0 L 15.5,9 15.5,7 15,6.5 13,6.5 12.5,6 12.5,5.5 14,4 14,3 13,2 12,2 10.5,3.5 10,3.5 9.5,3 9.5,1 9,0.5 Z m 1,5 c 1.5,0 2.5,1 2.5,2.5 0,1.5 -1,2.5 -2.5,2.5 C 6.5,10.5 5.5,9.5 5.5,8 5.5,6.5 6.5,5.5 8,5.5 Z'/%3E%3C/svg%3E"); -} - -#configure-editor span:hover { - background: url("data:image/svg+xml,%3C?xml version='1.0' standalone='no'?%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' version='1.1'%3E%3Cpath fill='%23ffb44c' stroke='%23ffb44c' stroke-width='1' d='M 7,0.5 6.5,1 6.5,3 6,3.5 5.5,3.5 4,2 3,2 2,3 2,4 3.5,5.5 3.5,6 3,6.5 1,6.5 0.5,7 l 0,2 0.5,0.5 2,0 0.5,0.5 0,0.5 -1.5,1.5 0,1 1,1 1,0 1.5,-1.5 0.5,0 0.5,0.5 0,2 0.5,0.5 2,0 0.5,-0.5 0,-2 0.5,-0.5 0.5,0 1.5,1.5 1,0 1,-1 0,-1 -1.5,-1.5 0,-0.5 0.5,-0.5 2,0 L 15.5,9 15.5,7 15,6.5 13,6.5 12.5,6 12.5,5.5 14,4 14,3 13,2 12,2 10.5,3.5 10,3.5 9.5,3 9.5,1 9,0.5 Z m 1,5 c 1.5,0 2.5,1 2.5,2.5 0,1.5 -1,2.5 -2.5,2.5 C 6.5,10.5 5.5,9.5 5.5,8 5.5,6.5 6.5,5.5 8,5.5 Z'/%3E%3C/svg%3E"); -} - -/* i32 and official */ -button, .header-btn:not(.header-btn-primary) { - color: #75818e; - background-color: transparent; - border: none; - font-family: "Roboto Mono"; - font-size: 90%; -} - -/* i32 and official */ -button:hover, button:focus, button:active, .header-btn:not(.header-btn-primary):hover, .header-btn:not(.header-btn-primary):focus, .header-btn:not(.header-btn-primary):active { - background: rgba(242, 151, 24, 0.05); - color: #ffb44c; -} - -button#mir { - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; - border-right: white; -} - -/* i32 and official */ -button.primary:hover, button.primary:focus, button.primary:active, .header-btn.header-btn-primary:hover, .header-btn.header-btn-primary:focus, .header-btn.header-btn-primary:active { - background-color: rgba(242, 151, 24, 0.05); - color: #ffb44c; -} - -/* i32 and official */ -button.primary, .header-btn.header-btn-primary { - background-color: transparent; - color: #e6e6e6; - font-family: "Roboto Mono"; -} - -.radios > :first-child { - background: transparent; -} - -input[type=radio]:checked + label { - background: transparent; - color: #e6e6e6; - border-bottom: 1px solid #ffb44c; - border-spacing: 2px; -} - -input[type=radio]:checked + label:hover, input[type=radio]:checked:focus + label, input[type=radio]:checked:active + label { - background: transparent; - border-bottom: 1px solid #ffb44c; -} - -.radios label:hover, .radios :focus + label, .radios :active + label, .header-mode label:hover, .header-mode :focus + label, .header-mode :active + label, .header-channel label:hover, .header-channel :focus + label, .header-channel :active + label { - background: transparent; - border-bottom: 1px solid rgba(242, 151, 24, 0.3); -} - -/* i32 and official */ -.radios label, .header-mode label, .header-channel label { - color: #75818e; - background: transparent; - transition: none; - border: none; - border-bottom: 1px solid transparent; - border-radius: 0px !important; -} - -.radios > :last-child { - background: transparent; -} - -.dropdown { - background: #14191f; - border: none; - box-shadow: 0px 6px 20px 0px black; -} - -.dropdown::before { - background-color: #14191f; - border: none; -} - -/* code editor itself */ - -/* i32 and official */ -main, .playground-editor { - border: none; - border-radius: 0px; -} - -.ace-chrome { - background-color: #0f1419; - color: #e6e1cf; -} - -.ace-chrome .ace_gutter { - background: transparent; - color: #2d3640; - font-family: "Roboto Mono" -} - -.ace-chrome .ace_gutter-active-line { - background-color: rgba(70, 70, 70, 0.25); -} - -.ace-chrome .ace_marker-layer .ace_selection { - background-color: rgba(37, 51, 64, 0.99); -} - -.ace-chrome .ace_cursor { - color: #f29718; -} - -.ace-chrome .ace_print-margin { - visibility: hidden !important; -} - -.ace-chrome .ace_marker-layer .ace_active-line { - background: #14191f; -} - -::-webkit-scrollbar { - width: 2px; - height: 2px; -} - -::-webkit-scrollbar-thumb:vertical { - background-color: #5c6773; - border-radius: 4px; -} - -::-webkit-scrollbar-thumb:horizontal { - background-color: #5c6773; - border-radius: 4px; -} - -/* look of code */ - -.ace-chrome .ace_keyword.ace_operator { - color: #ff7733; -} - -.ace-chrome .ace_support.ace_constant { - color: #e6e1cf; -} - -.ace-chrome .ace_string, .ace-chrome .ace_constant.ace_numeric { - color: #b8cc52; -} - -.ace-chrome .ace_storage, .ace-chrome .ace_keyword, .ace-chrome .ace_meta.ace_tag { - color: #ff7733; -} - -.ace-chrome .ace_entity.ace_name.ace_function { - color: #ffb454; -} - -.ace-chrome .ace_punctuation { - color: #ff7733; -} - -.ace-chrome .ace_comment { - color: #5c6773; - font-style: italic; -} - -.ace-chrome .ace_constant.ace_language { - color: #ff7733; -} - -.ace-chrome .ace_variable { - color: #ff7733; -} - -.ace-chrome .ace_indent-guide { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC) right repeat-y; -} - -/* result thing (shows you errors, output) */ - -#result.ace-chrome { - border: none !important; - box-shadow: 0px 6px 20px 0px black; -} - -#result.ace-chrome > button { - color: #e6e6e6; -} - -/* rules specfically for i32's playground */ - -.header-title { - background-color: transparent; -} - -.modal-content { - background-color: #14191f; - box-shadow: 0px 6px 20px 0px black; -} - -div.configuration-actions > button { - border-radius: 4px; - padding: .5em 1em; - cursor: pointer; -} - -/* their output thing */ - -.output-body { - background-color: #0f1419; - border: none; -} - -.output-tab { - background-color: #0f1419; - border-style: solid; - border-width: 1px; - border-color: transparent; - cursor: pointer; -} - -.output-tab-selected { - color: #e6e6e6; - cursor: default; - border-bottom-color: #ffb44c; -} - -.output-tab:last-of-type { - border-right: none; -} - -.output-header { - visibility: hidden; -} - -.output-tab:focus, .output-tab-selected:focus { - background-color: #0f1419; - color: #e6e6e6; - outline: none; - border-bottom-color: #ffb44c; -} - -.output-tab:hover, .output-tab:active { - background-color: #0f1419; - color: #e6e6e6; - border-bottom-color: rgba(242, 151, 24, 0.3); -} - -.output-tab-selected:hover, .output-tab-selected:active { - background-color: #0f1419; - color: #e6e6e6; - border-bottom-color: #ffb44c; -} - -a.token.error-location { - color: #cfbcf5; +/* i32 and official */ +:root, body { + background-color: #0f1419; + background-image: none; + color: #c5c5c5; +} + +:root::before { + content: none; +} + +#configure-editor span { + background: url("data:image/svg+xml,%3C?xml version='1.0' standalone='no'?%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' version='1.1'%3E%3Cpath fill='%2375818e' stroke='%2375818e' stroke-width='1' d='M 7,0.5 6.5,1 6.5,3 6,3.5 5.5,3.5 4,2 3,2 2,3 2,4 3.5,5.5 3.5,6 3,6.5 1,6.5 0.5,7 l 0,2 0.5,0.5 2,0 0.5,0.5 0,0.5 -1.5,1.5 0,1 1,1 1,0 1.5,-1.5 0.5,0 0.5,0.5 0,2 0.5,0.5 2,0 0.5,-0.5 0,-2 0.5,-0.5 0.5,0 1.5,1.5 1,0 1,-1 0,-1 -1.5,-1.5 0,-0.5 0.5,-0.5 2,0 L 15.5,9 15.5,7 15,6.5 13,6.5 12.5,6 12.5,5.5 14,4 14,3 13,2 12,2 10.5,3.5 10,3.5 9.5,3 9.5,1 9,0.5 Z m 1,5 c 1.5,0 2.5,1 2.5,2.5 0,1.5 -1,2.5 -2.5,2.5 C 6.5,10.5 5.5,9.5 5.5,8 5.5,6.5 6.5,5.5 8,5.5 Z'/%3E%3C/svg%3E"); +} + +#configure-editor span:hover { + background: url("data:image/svg+xml,%3C?xml version='1.0' standalone='no'?%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' version='1.1'%3E%3Cpath fill='%23ffb44c' stroke='%23ffb44c' stroke-width='1' d='M 7,0.5 6.5,1 6.5,3 6,3.5 5.5,3.5 4,2 3,2 2,3 2,4 3.5,5.5 3.5,6 3,6.5 1,6.5 0.5,7 l 0,2 0.5,0.5 2,0 0.5,0.5 0,0.5 -1.5,1.5 0,1 1,1 1,0 1.5,-1.5 0.5,0 0.5,0.5 0,2 0.5,0.5 2,0 0.5,-0.5 0,-2 0.5,-0.5 0.5,0 1.5,1.5 1,0 1,-1 0,-1 -1.5,-1.5 0,-0.5 0.5,-0.5 2,0 L 15.5,9 15.5,7 15,6.5 13,6.5 12.5,6 12.5,5.5 14,4 14,3 13,2 12,2 10.5,3.5 10,3.5 9.5,3 9.5,1 9,0.5 Z m 1,5 c 1.5,0 2.5,1 2.5,2.5 0,1.5 -1,2.5 -2.5,2.5 C 6.5,10.5 5.5,9.5 5.5,8 5.5,6.5 6.5,5.5 8,5.5 Z'/%3E%3C/svg%3E"); +} + +/* i32 and official */ +button, .header-btn:not(.header-btn-primary) { + color: #75818e; + background-color: transparent; + border: none; + font-family: "Roboto Mono"; + font-size: 90%; +} + +/* i32 and official */ +button:hover, button:focus, button:active, .header-btn:not(.header-btn-primary):hover, .header-btn:not(.header-btn-primary):focus, .header-btn:not(.header-btn-primary):active { + background: rgba(242, 151, 24, 0.05); + color: #ffb44c; +} + +button#mir { + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + border-right: white; +} + +/* i32 and official */ +button.primary:hover, button.primary:focus, button.primary:active, .header-btn.header-btn-primary:hover, .header-btn.header-btn-primary:focus, .header-btn.header-btn-primary:active { + background-color: rgba(242, 151, 24, 0.05); + color: #ffb44c; +} + +/* i32 and official */ +button.primary, .header-btn.header-btn-primary { + background-color: transparent; + color: #e6e6e6; + font-family: "Roboto Mono"; +} + +.radios > :first-child { + background: transparent; +} + +input[type=radio]:checked + label { + background: transparent; + color: #e6e6e6; + border-bottom: 1px solid #ffb44c; + border-spacing: 2px; +} + +input[type=radio]:checked + label:hover, input[type=radio]:checked:focus + label, input[type=radio]:checked:active + label { + background: transparent; + border-bottom: 1px solid #ffb44c; +} + +/*i32 and official*/ +.radios label:hover, .radios :focus + label, .radios :active + label, .header-mode label:hover, .header-mode :focus + label, .header-mode :active + label, .header-channel label:hover, .header-channel :focus + label, .header-channel :active + label { + background: transparent; + border-bottom: 1px solid rgba(242, 151, 24, 0.3); +} + +/* i32 and official */ +.radios label, .header-mode label, .header-channel label { + color: #75818e; + background: transparent; + transition: none; + border: none; + border-bottom: 1px solid transparent; + border-radius: 0px !important; +} + +.radios > :last-child { + background: transparent; +} + +.dropdown { + background: #14191f; + border: none; + box-shadow: 0px 6px 20px 0px black; +} + +.dropdown::before { + background-color: #14191f; + border: none; +} + +/* code editor itself */ + +/* i32 and official */ +main, .playground-editor { + border: none; + border-radius: 0px; +} + +.ace-chrome { + background-color: #0f1419; + color: #e6e1cf; +} + +.ace-chrome .ace_gutter { + background: transparent; + color: #2d3640; + font-family: "Roboto Mono" +} + +.ace-chrome .ace_gutter-active-line { + background-color: rgba(70, 70, 70, 0.25); +} + +.ace-chrome .ace_marker-layer .ace_selection { + background-color: rgba(37, 51, 64, 0.99); +} + +.ace-chrome .ace_cursor { + color: #f29718; +} + +.ace-chrome .ace_print-margin { + visibility: hidden !important; +} + +.ace-chrome .ace_marker-layer .ace_active-line { + background: #14191f; +} + +::-webkit-scrollbar { + width: 2px; + height: 2px; +} + +::-webkit-scrollbar-thumb:vertical { + background-color: #5c6773; + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:horizontal { + background-color: #5c6773; + border-radius: 4px; +} + +/* look of code */ + +.ace-chrome .ace_keyword.ace_operator { + color: #ff7733; +} + +.ace-chrome .ace_support.ace_constant { + color: #e6e1cf; +} + +.ace-chrome .ace_string, .ace-chrome .ace_constant.ace_numeric { + color: #b8cc52; +} + +.ace-chrome .ace_storage, .ace-chrome .ace_keyword, .ace-chrome .ace_meta.ace_tag { + color: #ff7733; +} + +.ace-chrome .ace_entity.ace_name.ace_function { + color: #ffb454; +} + +.ace-chrome .ace_punctuation { + color: #ff7733; +} + +.ace-chrome .ace_comment { + color: #5c6773; + font-style: italic; +} + +.ace-chrome .ace_constant.ace_language { + color: #ff7733; +} + +.ace-chrome .ace_variable { + color: #ff7733; +} + +.ace-chrome .ace_indent-guide { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC) right repeat-y; +} + +/* result thing (shows you errors, output) */ + +#result.ace-chrome { + border: none !important; + box-shadow: 0px 6px 20px 0px black; +} + +#result.ace-chrome > button { + color: #e6e6e6; +} + +/* rules specfically for i32's playground */ + +.header-title { + background-color: transparent; +} + +.modal-content { + background-color: #14191f; + box-shadow: 0px 6px 20px 0px black; +} + +div.configuration-actions > button { + border-radius: 4px; + padding: .5em 1em; + cursor: pointer; +} + +/* their output thing */ + +.output-body { + background-color: #0f1419; + border: none; +} + +.output-tab { + background-color: #0f1419; + border-style: solid; + border-width: 1px; + border-color: transparent; + cursor: pointer; +} + +.output-tab-selected { + color: #e6e6e6; + cursor: default; + border-bottom-color: #ffb44c; +} + +.output-tab:last-of-type { + border-right: none; +} + +.output-header { + visibility: hidden; +} + +.output-tab:focus, .output-tab-selected:focus { + background-color: #0f1419; + color: #e6e6e6; + outline: none; + border-bottom-color: #ffb44c; +} + +.output-tab:hover, .output-tab:active { + background-color: #0f1419; + color: #e6e6e6; + border-bottom-color: rgba(242, 151, 24, 0.3); +} + +.output-tab-selected:hover, .output-tab-selected:active { + background-color: #0f1419; + color: #e6e6e6; + border-bottom-color: #ffb44c; +} + +a.token.error-location { + color: #cfbcf5; } \ No newline at end of file diff --git a/css/rustdoc.css b/css/rustdoc.css index 2be6743..16f7cb0 100644 --- a/css/rustdoc.css +++ b/css/rustdoc.css @@ -1,362 +1,383 @@ -/* -Note that: - 1. I am not a CSS expert and will likely use cringe-worthy terminology - and cringe-worthy methods to get the look I want - 2. I put little to no effort into organizing this file - -Quick notes on things I learned while working on this (here so I remember them): - * `>` selector applies to immediate descendants only -*/ - - -/* fairly self-explanatory */ -body { - background-color: #0f1419; - color: #c5c5c5; -} - -/* remove lines below nav things */ -nav { - border-bottom: none; - margin-bottom: 8px; -} - -/* help position search bar correctly */ -.content { - padding: 0px; -} - -/* selected thing (function, method, etc.) */ -:target { - background: rgba(255, 52, 52, 0.33); - border-right: 3px solid #ffb44c; -} - -/* fix selected thing code part */ -h4:target code { - background: inherit; -} - -/* global scrollbar */ -::-webkit-scrollbar { - /* actual width is 2px */ - width: 5px; -} - -/* global scrollbar thumb (aka the part you see) */ -::-webkit-scrollbar-thumb:vertical { - background-color: #5c6773; - /* doesn't look right because of below hack */ - border-radius: 4px; - /* hacky way to 'pad' right side */ - border-right: 3px solid #0f1419; -} - -/* global scrollbar thumb horizontal (aka the part you see) */ -::-webkit-scrollbar-thumb:horizontal { - background-color: #5c6773; - /* doesn't look right because of below hack */ - border-radius: 4px; - /* more ugly, ugly, ugly hacks */ - border-bottom: 3px solid #191f26; - border-top: 11px solid #191f26; -} - -/* rust logo located top left as well as bottom-right on the root page */ -.sidebar img, div#versioninfo > img { - content: url(https://www.rust-lang.org/logos/rust-logo-256x256.png); -} - -/* change highlighted text color to look something like ayu */ -::selection { - background-color: rgba(37, 51, 64, 0.99); -} - -/* top left thing on sidebar */ -.sidebar .location { - background: #0f1419; - color: #333; - margin: 10px 0 20px 0; -} - -/* top left beneath logo, orange colons */ -p.location { - color: #ff7733 !important; -} - -/* shift + ? */ -#help dt { - background: #0f1419; -} - -/* shift + ? */ -#help > div { - background: #14191f; - box-shadow: 0px 6px 20px 0px black; - border: none; - border-radius: 4px; -} - -/* change color of headers and the lines that go under them */ -h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod), -h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, h3 a:link, h3 a:visited, h4 a:link, h4 a:visited, h5 a:link, h5 a:visited { - color: white; - border-bottom-color: #5c6773; -} - -/* fixes things related to code backing */ -h4 > code, h3 > code, h2 > code, h1 > code, td > code, .in-band > code, p > code, .invisible > code, .in-band { - background-color: #0f1419; -} - -code { - color: #ffb454; -} - -pre > code { - color: #e6e1cf; -} - -span > code { - color: #e6e1cf; -} - -a { - color: #0096cf; -} - -.docblock a > code { - color: #0096cf !important; -} - -/* hover highlight for blocks on sidebar */ -.block a:hover { - background: rgba(70, 70, 70, 0.33); -} - -/* `Run` button on code blocks */ -a.test-arrow { - font-family: "Roboto Mono"; - font-size: 90%; - color: #5c6773 !important; - border-radius: 4px; - font-weight: 400; - background-color: rgba(255, 255, 255, 0); - border: none; -} - -/* when button is hovered */ -a.test-arrow:hover { - background-color: rgba(242, 151, 24, 0.05); - color: #ffb44c !important; - font-weight: 300; -} - -/* modules, crates, types, etc. on sidebar */ -.block a, .block a.current.crate { - color: #5c6773 !important; - font-family: "Roboto Mono", "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 80%; - font-weight: 400; -} - -/* selected one */ -a.current { - color: #fff !important; -} - -/* more color changes for the lines below headers */ -.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 { - border-bottom-color: #5c6773; -} - -/* I don't remember, other than that this is the color for URLs */ -.docblock a, .docblock-short a, .stability a { - color: #0096cf; -} - -/* search bar */ -.search-input { - color: #ffffff; - background-color: #141920; - box-shadow: none; - transition: box-shadow 150ms ease-in-out; - border-radius: 4px; - margin-top: 8px; -} - -/* when typing in it */ -.search-input:focus { - border-radius: 4px; - box-shadow: 0px 6px 20px 0px black; -} - -/* move docs down from top */ -div.search-container { - margin-top: 20px; -} - -/* code in between backticks */ -.docblock code, .docblock-short code { - background-color: #191f26; -} - -/* stability notes (such as unstable) */ -.stab { - border-style: none; - border-top: 1px solid #5c6773; - margin-bottom: 5px; -} - -em.stab, .stab.deprecated, .stab.unstable { - background: #314559 !important; - border-style: none !important; - border-radius: 4px; - padding: 3px 6px 3px 6px; -} - -/* fix methods */ -.method.stab { - border-top-style: none; -} - -/* code blocks */ -pre { - background-color: #191f26; - border-radius: 4px; - color: #e6e1cf; -} - -/* `#[]` */ -pre.rust .attribute { - color: #5c6773 !important; - font-style: italic; -} - -/* making it work */ -pre.rust .attribute, pre.rust .attribute .ident, pre.rust .attribute .op { - color: #5c6773; -} - -/* lots of things, main orange color */ -pre.rust .kw, pre.rust .kw-2, pre.rust .prelude-ty, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .op, pre.rust .lifetime { - color: #ff7733; -} - -/* numbers and strings */ -pre.rust .number, pre.rust .string { - color: #b8cc52; -} - -/* self */ -pre.rust .self { - color: #36a3d9; - font-style: italic; -} - -/* comments */ -pre.rust .comment { - color: #5c6773; - font-style: italic; -} - -/* module color in doc listing */ -.content span.externcrate, .content span.mod, .content a.mod, .block a.current.mod { - color: #acccf9; -} - -/* struct color */ -.content span.struct, .content a.struct, .block a.current.struct { - color: #ffa0a5; -} - -/* enum color */ -.content span.enum, .content a.enum, .block a.current.enum { - color: #99e0c9; -} - -/* trait color */ -.content span.trait, .content a.trait, .block a.current.trait { - color: #36a3d9; -} - /* type definition color */ -.content span.type, .content a.type, .block a.current.type { - color: #cfbcf5; -} - -/* function name color */ -.content span.fn, .content a.fn, .block a.current.fn, .content span.method, .content a.method, .block a.current.method, .content span.tymethod, .content a.tymethod, .block a.current.tymethod, .content .fnname { - color: #fdd687; -} - -/* macro name color */ -.content span.macro, .content a.macro, .block a.current.macro, pre.rust .macro, pre.rust .macro-nonterminal { - color: #a37acc; -} - -/* book stuff */ - -blockquote { - color: inherit; - background-color: rgba(70, 70, 70, 0.33); - border-style: none; - border-radius: 4px; -} - -/* sidebar */ -#toc { - border-style: none; - background-color: #0f1419; -} - -/* list items */ -.chapter li a { - color: #5c6773; -} - -/* when selected */ -.chapter li a.active { - color: #fff; -} - -/* when hovered */ -.chapter li a:hover { - color: #fff; - background-color: rgba(70, 70, 70, 0.33); -} - -/* space between each item */ -.chapter { - line-height: 22px; -} - -/* inherit from above */ -.section { - line-height: inherit; -} - -/* button to show list on small screens (kinda pointless to style but whatever) */ -#toggle-nav { - border-radius: 4px; - background-color: rgba(255, 255, 255, 0); - border: none; -} - -/* individual bars */ -#toggle-nav .bar { - background-color: #5c6773; -} - -/* on hover */ -#toggle-nav:hover { - background-color: rgba(242, 151, 24, 0.05); -} - -#toggle-nav:hover .bar { - background-color: #ffb44c; -} - -/* sticker in bottom-right on doc.rust-lang.org */ -.white-sticker { - background-color: transparent; +/* +Note that: + 1. I am not a CSS expert and will likely use cringe-worthy terminology + and cringe-worthy methods to get the look I want + 2. I put little to no effort into organizing this file + +Quick notes on things I learned while working on this (here so I remember them): + * `>` selector applies to immediate descendants only +*/ + + +/* fairly self-explanatory */ +body { + background-color: #0f1419; + color: #c5c5c5; +} + +/* remove lines below nav things */ +nav { + border-bottom: none; + margin-bottom: 8px; +} + +/* help position search bar correctly */ +.content { + padding: 0px; +} + +/* selected thing (function, method, etc.) */ +:target { + background: rgba(255, 52, 52, 0.33); + border-right: 3px solid #ffb44c; +} + +/* fix selected thing code part */ +h4:target code { + background: inherit; +} + +/* global scrollbar */ +::-webkit-scrollbar { + /* actual width is 2px */ + width: 5px; +} + +/* global scrollbar thumb (aka the part you see) */ +::-webkit-scrollbar-thumb:vertical { + background-color: #5c6773; + /* doesn't look right because of below hack */ + border-radius: 4px; + /* hacky way to 'pad' right side */ + border-right: 3px solid #0f1419; +} + +/* global scrollbar thumb horizontal (aka the part you see) */ +::-webkit-scrollbar-thumb:horizontal { + background-color: #5c6773; + /* doesn't look right because of below hack */ + border-radius: 4px; + /* more ugly, ugly, ugly hacks */ + border-bottom: 3px solid #191f26; + border-top: 11px solid #191f26; +} + +/* rust logo located top left as well as bottom-right on the root page */ +.sidebar img, div#versioninfo > img { + content: url(https://www.rust-lang.org/logos/rust-logo-256x256.png); +} + +/* change highlighted text color to look something like ayu */ +::selection { + background-color: rgba(37, 51, 64, 0.99); +} + +/* fix sidebar */ +.sidebar { + background-color: #0f1419; +} + +/* top left thing on sidebar */ +.sidebar .location { + background: #0f1419; + color: #333; + margin: 10px 0 20px 0; +} + +/* top left beneath logo, orange colons */ +p.location { + color: #ff7733 !important; +} + +/* shift + ? */ +#help dt { + background: #0f1419; +} + +/* shift + ? */ +#help > div { + background: #14191f; + box-shadow: 0px 6px 20px 0px black; + border: none; + border-radius: 4px; +} + +/* change color of headers and the lines that go under them */ +h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod), +h1 a:link, h1 a:visited, h2 a:link, h2 a:visited, h3 a:link, h3 a:visited, h4 a:link, h4 a:visited, h5 a:link, h5 a:visited { + color: white; + border-bottom-color: #5c6773; +} + +/* fixes things related to code backing */ +h4 > code, h3 > code, h2 > code, h1 > code, td > code, .in-band > code, p > code, .invisible > code, .in-band { + background-color: #0f1419; +} + +code { + color: #ffb454; +} + +pre > code { + color: #e6e1cf; +} + +span > code { + color: #e6e1cf; +} + +a { + color: #0096cf; +} + +.docblock a > code { + color: #0096cf !important; +} + +/* hover highlight for blocks on sidebar */ +.block a:hover { + background: rgba(70, 70, 70, 0.33); +} + +/* `Run` button on code blocks */ +a.test-arrow { + font-family: "Roboto Mono"; + font-size: 90%; + color: #5c6773 !important; + border-radius: 4px; + font-weight: 400; + background-color: rgba(255, 255, 255, 0); + border: none; +} + +/* when button is hovered */ +a.test-arrow:hover { + background-color: rgba(242, 151, 24, 0.05); + color: #ffb44c !important; + font-weight: 300; +} + +/* modules, crates, types, etc. on sidebar */ +.block a, .block a.current.crate { + color: #5c6773 !important; + font-family: "Roboto Mono", "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 80%; + font-weight: 400; +} + +/* selected one */ +a.current { + color: #fff !important; + background-color: transparent !important; +} + +/* more color changes for the lines below headers */ +.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 { + border-bottom-color: #5c6773; +} + +/* I don't remember, other than that this is the color for URLs */ +.docblock a, .docblock-short a, .stability a { + color: #0096cf; +} + +/* search bar */ +.search-input { + color: #ffffff; + background-color: #141920; + box-shadow: none; + transition: box-shadow 150ms ease-in-out; + border-radius: 4px; + margin-top: 8px; +} + +/* when typing in it */ +.search-input:focus { + border-radius: 4px; + box-shadow: 0px 6px 20px 0px black; +} + +/* move docs down from top */ +div.search-container { + margin-top: 20px; +} + +/* code in between backticks */ +.docblock code, .docblock-short code { + background-color: #191f26; +} + +/* stability notes (such as unstable) */ +.stab { + border-style: none; + border-top: 1px solid #5c6773; + margin-bottom: 5px; +} + +em.stab, .stab.deprecated, .stab.unstable { + background: #314559 !important; + border-style: none !important; + border-radius: 4px; + padding: 3px 6px 3px 6px; +} + +/* fix methods */ +.method.stab { + border-top-style: none; +} + +/* code blocks */ +pre { + background-color: #191f26; + border-radius: 4px; + color: #e6e1cf; +} + +/* `#[]` */ +pre.rust .attribute { + color: #5c6773 !important; + font-style: italic; +} + +/* making it work */ +pre.rust .attribute, pre.rust .attribute .ident, pre.rust .attribute .op { + color: #5c6773; +} + +/* lots of things, main orange color */ +pre.rust .kw, pre.rust .kw-2, pre.rust .prelude-ty, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .op, pre.rust .lifetime { + color: #ff7733; +} + +/* numbers and strings */ +pre.rust .number, pre.rust .string { + color: #b8cc52; +} + +/* self */ +pre.rust .self { + color: #36a3d9; + font-style: italic; +} + +/* comments */ +pre.rust .comment { + color: #5c6773; + font-style: italic; +} + +/* module color in doc listing */ +.content span.externcrate, .content span.mod, .content a.mod, .block a.current.mod { + color: #acccf9; +} + +/* struct color */ +.content span.struct, .content a.struct, .block a.current.struct { + color: #ffa0a5; +} + +/* enum color */ +.content span.enum, .content a.enum, .block a.current.enum { + color: #99e0c9; +} + +/* trait color */ +.content span.trait, .content a.trait, .block a.current.trait { + color: #36a3d9; +} + /* type definition color */ +.content span.type, .content a.type, .block a.current.type { + color: #cfbcf5; +} + +/* function name color */ +.content span.fn, .content a.fn, .block a.current.fn, .content span.method, .content a.method, .block a.current.method, .content span.tymethod, .content a.tymethod, .block a.current.tymethod, .content .fnname { + color: #fdd687; +} + +/* macro name color */ +.content span.macro, .content a.macro, .block a.current.macro, pre.rust .macro, pre.rust .macro-nonterminal { + color: #a37acc; +} + +/* book stuff */ + +blockquote { + color: inherit; + background-color: rgba(70, 70, 70, 0.33); + border-style: none; + border-radius: 4px; +} + +/* sidebar */ +#toc { + border-style: none; + background-color: #0f1419; +} + +/* list items */ +.chapter li a { + color: #5c6773; +} + +/* when selected */ +.chapter li a.active { + color: #fff; +} + +/* when hovered */ +.chapter li a:hover { + color: #fff; + background-color: rgba(70, 70, 70, 0.33); +} + +/* space between each item */ +.chapter { + line-height: 22px; +} + +/* inherit from above */ +.section { + line-height: inherit; +} + +/* fix line numbers for source */ +.content.source { + padding-top: 10px; +} + +/* fix border look for line numbers */ +.content.source pre.rust { + border-radius: 0px 4px 4px 0px; +} + +/* same as above */ +.content pre.line-numbers { + border-radius: 4px 0px 0px 4px; +} + +/* button to show list on small screens (kinda pointless to style but whatever) */ +#toggle-nav { + border-radius: 4px; + background-color: rgba(255, 255, 255, 0); + border: none; +} + +/* individual bars */ +#toggle-nav .bar { + background-color: #5c6773; +} + +/* on hover */ +#toggle-nav:hover { + background-color: rgba(242, 151, 24, 0.05); +} + +#toggle-nav:hover .bar { + background-color: #ffb44c; +} + +/* sticker in bottom-right on doc.rust-lang.org */ +.white-sticker { + background-color: transparent; } \ No newline at end of file