From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/librustdoc/html/static/css/themes/ayu.css | 563 ++++++++++++++++++++++++ src/librustdoc/html/static/css/themes/dark.css | 409 +++++++++++++++++ src/librustdoc/html/static/css/themes/light.css | 395 +++++++++++++++++ 3 files changed, 1367 insertions(+) create mode 100644 src/librustdoc/html/static/css/themes/ayu.css create mode 100644 src/librustdoc/html/static/css/themes/dark.css create mode 100644 src/librustdoc/html/static/css/themes/light.css (limited to 'src/librustdoc/html/static/css/themes') diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css new file mode 100644 index 000000000..c42cac59b --- /dev/null +++ b/src/librustdoc/html/static/css/themes/ayu.css @@ -0,0 +1,563 @@ +/* +Based off of the Ayu theme +Original by Dempfi (https://github.com/dempfi/ayu) +*/ + +:root { + --main-background-color: #0f1419; + --main-color: #c5c5c5; + --settings-input-color: #ffb454; + --sidebar-background-color: #14191f; + --sidebar-background-color-hover: rgba(70, 70, 70, 0.33); + --code-block-background-color: #191f26; + --scrollbar-track-background-color: transparent; + --scrollbar-thumb-background-color: #5c6773; + --scrollbar-color: #5c6773 #24292f; + --headings-border-bottom-color: #5c6773; +} + +.slider { + background-color: #ccc; +} +.slider:before { + background-color: white; +} +input:focus + .slider { + box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3); +} + +h1, h2, h3, h4 { + color: white; +} +h1.fqn a { + color: #fff; +} +h4 { + border: none; +} + +.in-band { + background-color: #0f1419; +} + +.docblock code { + color: #ffb454; +} +.code-header { + color: #e6e1cf; +} +.docblock pre > code, pre > code { + color: #e6e1cf; +} +span code { + color: #e6e1cf; +} +.docblock a > code { + color: #39AFD7 !important; +} +pre, .rustdoc.source .example-wrap { + color: #e6e1cf; +} + +.rust-logo { + filter: drop-shadow(1px 0 0px #fff) + drop-shadow(0 1px 0 #fff) + drop-shadow(-1px 0 0 #fff) + drop-shadow(0 -1px 0 #fff); +} + +.sidebar .current, +.sidebar a:hover { + background-color: transparent; + color: #ffb44c; +} + +.sidebar-elems .location { + color: #ff7733; +} + +.line-numbers span { color: #5c6773; } +.line-numbers .line-highlighted { + color: #708090; + background-color: rgba(255, 236, 164, 0.06); + padding-right: 4px; + border-right: 1px solid #ffb44c; +} + +.docblock table td, .docblock table th { + border-color: #5c6773; +} + +.search-results a:hover { + background-color: #777; +} + +.search-results a:focus { + color: #000 !important; + background-color: #c6afb3; +} +.search-results a { + color: #0096cf; +} +.search-results a div.desc { + color: #c5c5c5; +} + +.content .item-info::before { color: #ccc; } + +.content span.foreigntype, .content a.foreigntype { color: #ffa0a5; } +.content span.union, .content a.union { color: #ffa0a5; } +.content span.constant, .content a.constant, +.content span.static, .content a.static { color: #39AFD7; } +.content span.primitive, .content a.primitive { color: #ffa0a5; } +.content span.traitalias, .content a.traitalias { color: #39AFD7; } +.content span.keyword, .content a.keyword { color: #39AFD7; } + +.content span.externcrate, .content span.mod, .content a.mod { + color: #39AFD7; +} +.content span.struct, .content a.struct { + color: #ffa0a5; +} +.content span.enum, .content a.enum { + color: #ffa0a5; +} +.content span.trait, .content a.trait { + color: #39AFD7; +} +.content span.type, .content a.type { + color: #39AFD7; +} +.content span.type, +.content a.type, +.block a.current.type { color: #39AFD7; } +.content span.associatedtype, +.content a.associatedtype, +.block a.current.associatedtype { color: #39AFD7; } +.content span.fn, .content a.fn, .content span.method, +.content a.method, .content span.tymethod, +.content a.tymethod, .content .fnname { + color: #fdd687; +} +.content span.attr, .content a.attr, .content span.derive, +.content a.derive, .content span.macro, .content a.macro { + color: #a37acc; +} + +.sidebar a { color: #53b1db; } +.sidebar a.current.type { color: #53b1db; } +.sidebar a.current.associatedtype { color: #53b1db; } + +pre.rust .comment { color: #788797; } +pre.rust .doccomment { color: #a1ac88; } + +nav.main .current { + border-top-color: #5c6773; + border-bottom-color: #5c6773; +} +nav.main .separator { + border: 1px solid #5c6773; +} +a { + color: #39AFD7; +} + +.sidebar h2 a, +.sidebar h3 a { + color: white; +} +.search-results a { + color: #0096cf; +} +body.source .example-wrap pre.rust a { + background: #333; +} + +details.rustdoc-toggle > summary.hideme > span, +details.rustdoc-toggle > summary::before { + color: #999; +} + +details.rustdoc-toggle > summary::before { + filter: invert(100%); +} + +#crate-search, .search-input { + background-color: #141920; + border-color: #424c57; +} + +#crate-search { + /* Without the `!important`, the border-color is ignored for ``... + It cannot be in the group above because `.search-input` has a different border color on + hover. */ + border-color: #f0f0f0 !important; +} + +.search-input { + border-color: #e0e0e0; +} + +.search-input:focus { + border-color: #008dfd; +} + +.stab.empty-impl { background: #FFF5D6; border-color: #FFC600; color: #2f2f2f; } +.stab.unstable { background: #FFF5D6; border-color: #FFC600; color: #2f2f2f; } +.stab.deprecated { background: #ffc4c4; border-color: #db7b7b; color: #2f2f2f; } +.stab.must_implement { background: #F3DFFF; border-color: #b07bdb; color: #2f2f2f; } +.stab.portability { background: #F3DFFF; border-color: #b07bdb; color: #2f2f2f; } +.stab.portability > code { background: none; } + +.rightside, +.out-of-band { + color: grey; +} + +.line-numbers :target { background-color: transparent; } + +/* Code highlighting */ +pre.rust .kw { color: #ab8ac1; } +pre.rust .kw-2, pre.rust .prelude-ty { color: #769acb; } +pre.rust .number, pre.rust .string { color: #83a300; } +pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, +pre.rust .attribute, pre.rust .attribute .ident { color: #ee6868; } +pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; } +pre.rust .lifetime { color: #d97f26; } +pre.rust .question-mark { + color: #ff9011; +} + +.example-wrap > pre.line-number { + border-color: #4a4949; +} + +a.test-arrow { + color: #dedede; + background-color: rgba(78, 139, 202, 0.2); +} + +a.test-arrow:hover{ + background-color: #4e8bca; +} + +.toggle-label, +.code-attribute { + color: #999; +} + +:target { + background-color: #494a3d; + border-right: 3px solid #bb7410; +} + +pre.compile_fail { + border-left: 2px solid rgba(255,0,0,.8); +} + +pre.compile_fail:hover, .information:hover + pre.compile_fail { + border-left: 2px solid #f00; +} + +pre.should_panic { + border-left: 2px solid rgba(255,0,0,.8); +} + +pre.should_panic:hover, .information:hover + pre.should_panic { + border-left: 2px solid #f00; +} + +pre.ignore { + border-left: 2px solid rgba(255,142,0,.6); +} + +pre.ignore:hover, .information:hover + pre.ignore { + border-left: 2px solid #ff9200; +} + +.tooltip.compile_fail { + color: rgba(255,0,0,.8); +} + +.information > .compile_fail:hover { + color: #f00; +} + +.tooltip.should_panic { + color: rgba(255,0,0,.8); +} + +.information > .should_panic:hover { + color: #f00; +} + +.tooltip.ignore { + color: rgba(255,142,0,.6); +} + +.information > .ignore:hover { + color: #ff9200; +} + +.search-failed a { + color: #0089ff; +} + +.tooltip::after { + background-color: #000; + color: #fff; + border-color: #000; +} + +.tooltip::before { + border-color: transparent black transparent transparent; +} + +.notable-traits-tooltiptext { + background-color: #111; + border-color: #777; +} + +.notable-traits-tooltiptext .notable { + border-bottom-color: #d2d2d2; +} + +#titles > button:not(.selected) { + background-color: #252525; + border-top-color: #252525; +} + +#titles > button:hover, #titles > button.selected { + border-top-color: #0089ff; + background-color: #353535; +} + +#titles > button > div.count { + color: #888; +} + +@media (max-width: 700px) { + .sidebar-elems { + border-right-color: #000; + } +} + +kbd { + color: #000; + background-color: #fafbfc; + border-color: #d1d5da; + border-bottom-color: #c6cbd1; + box-shadow: inset 0 -1px 0 #c6cbd1; +} + +#settings-menu > a, #help-button > button { + border-color: #e0e0e0; + background: #f0f0f0; + color: #000; +} + +#settings-menu > a:hover, #settings-menu > a:focus, +#help-button > button:hover, #help-button > button:focus { + border-color: #ffb900; +} + +.popover, .popover::before, +#help-button span.top, #help-button span.bottom { + border-color: #d2d2d2; +} + +#copy-path { + color: #999; +} +#copy-path > img { + filter: invert(50%); +} +#copy-path:hover > img { + filter: invert(65%); +} + +#theme-choices { + border-color: #e0e0e0; + background-color: #353535; +} + +#theme-choices > button:not(:first-child) { + border-top-color: #e0e0e0; +} + +#theme-choices > button:hover, #theme-choices > button:focus { + background-color: #4e4e4e; +} + +.search-results .result-name span.alias { + color: #fff; +} +.search-results .result-name span.grey { + color: #ccc; +} + +#source-sidebar > .title { + border-bottom-color: #ccc; +} +#source-sidebar div.files > a:hover, details.dir-entry summary:hover, +#source-sidebar div.files > a:focus, details.dir-entry summary:focus { + background-color: #444; +} +#source-sidebar div.files > a.selected { + background-color: #333; +} + +.scraped-example-list .scrape-help { + border-color: #aaa; + color: #eee; +} +.scraped-example-list .scrape-help:hover { + border-color: white; + color: white; +} +.more-examples-toggle summary, .more-examples-toggle .hide-more { + color: #999; +} +.scraped-example .example-wrap .rust span.highlight { + background: rgb(91, 59, 1); +} +.scraped-example .example-wrap .rust span.highlight.focus { + background: rgb(124, 75, 15); +} +.scraped-example:not(.expanded) .code-wrapper:before { + background: linear-gradient(to bottom, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0)); +} +.scraped-example:not(.expanded) .code-wrapper:after { + background: linear-gradient(to top, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0)); +} +.toggle-line-inner { + background: #999; +} +.toggle-line:hover .toggle-line-inner { + background: #c5c5c5; +} diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css new file mode 100644 index 000000000..b751acff1 --- /dev/null +++ b/src/librustdoc/html/static/css/themes/light.css @@ -0,0 +1,395 @@ +:root { + --main-background-color: white; + --main-color: black; + --settings-input-color: #2196f3; + --sidebar-background-color: #F5F5F5; + --sidebar-background-color-hover: #E0E0E0; + --code-block-background-color: #F5F5F5; + --scrollbar-track-background-color: #dcdcdc; + --scrollbar-thumb-background-color: rgba(36, 37, 39, 0.6); + --scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9; + --headings-border-bottom-color: #ddd; +} + +.slider { + background-color: #ccc; +} +.slider:before { + background-color: white; +} +input:focus + .slider { + box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3); +} + +.in-band { + background-color: white; +} + +.rust-logo { + /* This rule exists to force other themes to explicitly style the logo. + * Rustdoc has a custom linter for this purpose. + */ +} + +.sidebar .current, +.sidebar a:hover { + background-color: #fff; +} + +.line-numbers span { color: #c67e2d; } +.line-numbers .line-highlighted { + background-color: #FDFFD3 !important; +} + +.docblock table td, .docblock table th { + border-color: #ddd; +} + +.search-results a:hover { + background-color: #ddd; +} + +.search-results a:focus { + color: #000 !important; + background-color: #ccc; +} +.search-results a:focus span { color: #000 !important; } +a.result-trait:focus { background-color: #c7b6ff; } +a.result-traitalias:focus { background-color: #c7b6ff; } +a.result-mod:focus, +a.result-externcrate:focus { background-color: #afc6e4; } +a.result-enum:focus { background-color: #e7b1a0; } +a.result-struct:focus { background-color: #e7b1a0; } +a.result-union:focus { background-color: #e7b1a0; } +a.result-fn:focus, +a.result-method:focus, +a.result-tymethod:focus { background-color: #c6afb3; } +a.result-type:focus { background-color: #e7b1a0; } +a.result-associatedtype:focus { background-color: #afc6e4; } +a.result-foreigntype:focus { background-color: #e7b1a0; } +a.result-attr:focus, +a.result-derive:focus, +a.result-macro:focus { background-color: #8ce488; } +a.result-constant:focus, +a.result-static:focus { background-color: #afc6e4; } +a.result-primitive:focus { background-color: #e7b1a0; } +a.result-keyword:focus { background-color: #afc6e4; } + +.content .item-info::before { color: #ccc; } + +.content span.enum, .content a.enum, .block a.current.enum { color: #AD378A; } +.content span.struct, .content a.struct, .block a.current.struct { color: #AD378A; } +.content span.type, .content a.type, .block a.current.type { color: #AD378A; } +.content span.foreigntype, .content a.foreigntype, .block a.current.foreigntype { color: #3873AD; } +.content span.associatedtype, +.content a.associatedtype, +.block a.current.associatedtype { color: #3873AD; } +.content span.attr, .content a.attr, .block a.current.attr, +.content span.derive, .content a.derive, .block a.current.derive, +.content span.macro, .content a.macro, .block a.current.macro { color: #068000; } +.content span.union, .content a.union, .block a.current.union { color: #AD378A; } +.content span.constant, .content a.constant, .block a.current.constant, +.content span.static, .content a.static, .block a.current.static { color: #3873AD; } +.content span.primitive, .content a.primitive, .block a.current.primitive { color: #AD378A; } +.content span.externcrate, +.content span.mod, .content a.mod, .block a.current.mod { color: #3873AD; } +.content span.trait, .content a.trait, .block a.current.trait { color: #6E4FC9; } +.content span.traitalias, .content a.traitalias, .block a.current.traitalias { color: #5137AD; } +.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: #AD7C37; } +.content span.keyword, .content a.keyword, .block a.current.keyword { color: #3873AD; } + +.sidebar a { color: #356da4; } +.sidebar a.current.enum { color: #a63283; } +.sidebar a.current.struct { color: #a63283; } +.sidebar a.current.type { color: #a63283; } +.sidebar a.current.associatedtype { color: #356da4; } +.sidebar a.current.foreigntype { color: #356da4; } +.sidebar a.current.attr, +.sidebar a.current.derive, +.sidebar a.current.macro { color: #067901; } +.sidebar a.current.union { color: #a63283; } +.sidebar a.current.constant +.sidebar a.current.static { color: #356da4; } +.sidebar a.current.primitive { color: #a63283; } +.sidebar a.current.externcrate +.sidebar a.current.mod { color: #356da4; } +.sidebar a.current.trait { color: #6849c3; } +.sidebar a.current.traitalias { color: #4b349e; } +.sidebar a.current.fn, +.sidebar a.current.method, +.sidebar a.current.tymethod { color: #a67736; } +.sidebar a.current.keyword { color: #356da4; } + +nav.main .current { + border-top-color: #000; + border-bottom-color: #000; +} +nav.main .separator { + border: 1px solid #000; +} + +a { + color: #3873AD; +} + +body.source .example-wrap pre.rust a { + background: #eee; +} + +details.rustdoc-toggle > summary.hideme > span, +details.rustdoc-toggle > summary::before { + color: #999; +} + +#crate-search, .search-input { + background-color: white; + border-color: #e0e0e0; +} + +#crate-search { + /* Without the `!important`, the border-color is ignored for `