From 83ffd5c18d83bbb2786309139e3030590f4985f1 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 15 Jul 2020 17:20:46 +0200 Subject: [PATCH] Fix tidy issues --- src/librustdoc/html/static/normalize.css | 1 + src/librustdoc/html/static/rustdoc.css | 23 +++++++++++---------- src/librustdoc/html/static/themes/ayu.css | 22 +++++++++++++------- src/librustdoc/html/static/themes/dark.css | 6 ++++-- src/librustdoc/html/static/themes/light.css | 6 ++++-- 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/librustdoc/html/static/normalize.css b/src/librustdoc/html/static/normalize.css index 2804c26a29662..0e0426279183f 100644 --- a/src/librustdoc/html/static/normalize.css +++ b/src/librustdoc/html/static/normalize.css @@ -1 +1,2 @@ +/* ignore-tidy-linelength */ /*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index f5551446bf220..38709b445efae 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -49,9 +49,9 @@ } * { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } /* This part handles the "default" theme being used depending on the system one. */ @@ -91,7 +91,8 @@ h2 { h3 { font-size: 1.3em; } -h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) { +h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important), +h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) { font-weight: 500; margin: 20px 0 15px 0; padding-bottom: 6px; @@ -103,7 +104,8 @@ h1.fqn { h1.fqn > .in-band > a:hover { text-decoration: underline; } -h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) { +h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), +h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant) { border-bottom: 1px solid; } h3.impl, h3.method, h4.method, h3.type, h4.type, h4.associatedconstant { @@ -1123,7 +1125,7 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { /* The margin on the tooltip does not capture hover events, this extends the area of hover enough so that mouse hover is not lost when moving the mouse to the tooltip */ - content: "\00a0\00a0\00a0"; + content: "\00a0\00a0\00a0"; } .important-traits .important, .important-traits .docblock { @@ -1131,13 +1133,12 @@ h3 > .collapse-toggle, h4 > .collapse-toggle { } .important-traits .docblock code.content{ - margin: 0; - padding: 0; - font-size: 20px; + margin: 0; + padding: 0; + font-size: 20px; } -/* Example code has the "Run" button that - needs to be positioned relative to the pre */ +/* Example code has the "Run" button that needs to be positioned relative to the pre */ pre.rust.rust-example-rendered { position: relative; } diff --git a/src/librustdoc/html/static/themes/ayu.css b/src/librustdoc/html/static/themes/ayu.css index 3b6749c280f20..e0ab7170ea877 100644 --- a/src/librustdoc/html/static/themes/ayu.css +++ b/src/librustdoc/html/static/themes/ayu.css @@ -10,7 +10,8 @@ body { color: #c5c5c5; } -h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) { +h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), +h4:not(.method):not(.type):not(.tymethod) { color: white; } h1.fqn { @@ -41,7 +42,7 @@ h3 > code, h4 > code, h5 > code { color: #e6e1cf; } pre > code { - color: #e6e1cf; + color: #e6e1cf; } span code { color: #e6e1cf; @@ -192,7 +193,7 @@ pre { color: #a37acc; } -pre.rust .comment, pre.rust .doccomment { +pre.rust .comment, pre.rust .doccomment { color: #788797; font-style: italic; } @@ -423,12 +424,13 @@ pre.ignore:hover, .information:hover + pre.ignore { /* rules that this theme does not need to set, here to satisfy the rule checker */ /* note that a lot of these are partially set in some way (meaning they are set individually rather than as a group) */ -/* TODO: these rules should be at the bottom of the file but currently must be +/* FIXME: these rules should be at the bottom of the file but currently must be above the `@media (max-width: 700px)` rules due to a bug in the css checker */ /* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */ .content .highlighted.mod, .content .highlighted.externcrate {} .search-input:focus {} -.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 {} +.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 {} .content .highlighted.trait {} .content span.struct,.content a.struct,.block a.current.struct {} #titles>div:hover,#titles>div.selected {} @@ -443,16 +445,20 @@ pre.rust .lifetime {} .content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod {} h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod) {} .content span.enum,.content a.enum,.block a.current.enum {} -.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static {} +.content span.constant,.content a.constant,.block a.current.constant,.content span.static, +.content a.static,.block a.current.static {} .content span.keyword,.content a.keyword,.block a.current.keyword {} pre.rust .comment {} .content .highlighted.enum {} .content .highlighted.struct {} .content .highlighted.keyword {} .content span.traitalias,.content a.traitalias,.block a.current.traitalias {} -.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 {} +.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 {} pre.rust .kw {} -pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident {} +pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute, +pre.rust .attribute .ident {} .content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype {} pre.rust .doccomment {} .stab.deprecated {} diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index dc15220aa0690..33c0f885fa95b 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -3,13 +3,15 @@ body { color: #ddd; } -h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) { +h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), +h4:not(.method):not(.type):not(.tymethod) { color: #ddd; } h1.fqn { border-bottom-color: #d2d2d2; } -h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) { +h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), +h4:not(.method):not(.type):not(.tymethod) { border-bottom-color: #d2d2d2; } diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css index 64d59ca411a87..569ce7da2091f 100644 --- a/src/librustdoc/html/static/themes/light.css +++ b/src/librustdoc/html/static/themes/light.css @@ -5,13 +5,15 @@ body { color: black; } -h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) { +h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), +h4:not(.method):not(.type):not(.tymethod) { color: black; } h1.fqn { border-bottom-color: #D5D5D5; } -h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) { +h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), +h4:not(.method):not(.type):not(.tymethod) { border-bottom-color: #DDDDDD; }