Skip to content

Commit 637233d

Browse files
authored
Rollup merge of #70005 - GuillaumeGomez:code-block-signs, r=kinnison
[rustdoc] Improve visibility for code blocks warnings It appeared that a lot of people didn't notice when a code block was meant to fail compilation or wasn't tested at all. The changes here make the colors less transparent and the icon bigger. So before it looked like this: ![old-light](https://user-images.githubusercontent.com/3050060/76687070-f1cdbb80-6620-11ea-9b73-0c787dc671f7.png) ![old-dark](https://user-images.githubusercontent.com/3050060/76687079-f4c8ac00-6620-11ea-90fb-e548329e01b4.png) And now it looks like this: ![new-light](https://user-images.githubusercontent.com/3050060/76687092-fd20e700-6620-11ea-9ebb-2b6852f00899.png) ![new-dark](https://user-images.githubusercontent.com/3050060/76687091-fd20e700-6620-11ea-8fea-6854c8367b97.png) cc @rust-lang/rustdoc r? @kinnison
2 parents 4c3a5a5 + 8216a32 commit 637233d

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

Diff for: src/librustdoc/html/static/rustdoc.css

+10-3
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
10321032

10331033
.information {
10341034
position: absolute;
1035-
left: -20px;
1035+
left: -25px;
10361036
margin-top: 7px;
10371037
z-index: 1;
10381038
}
@@ -1047,12 +1047,13 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
10471047
width: 120px;
10481048
display: none;
10491049
text-align: center;
1050-
padding: 5px 3px;
1050+
padding: 5px 3px 3px 3px;
10511051
border-radius: 6px;
10521052
margin-left: 5px;
10531053
top: -5px;
10541054
left: 105%;
10551055
z-index: 10;
1056+
font-size: 16px;
10561057
}
10571058

10581059
.tooltip:hover .tooltiptext {
@@ -1063,14 +1064,20 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
10631064
content: " ";
10641065
position: absolute;
10651066
top: 50%;
1066-
left: 11px;
1067+
left: 16px;
10671068
margin-top: -5px;
10681069
border-width: 5px;
10691070
border-style: solid;
10701071
}
10711072

1073+
.tooltip.compile_fail, .tooltip.ignore {
1074+
font-weight: bold;
1075+
font-size: 20px;
1076+
}
1077+
10721078
.tooltip .tooltiptext {
10731079
border: 1px solid;
1080+
font-weight: normal;
10741081
}
10751082

10761083
pre.rust {

Diff for: src/librustdoc/html/static/themes/dark.css

+5-4
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ a.test-arrow:hover{
254254
}
255255

256256
pre.compile_fail {
257-
border-left: 2px solid rgba(255,0,0,.6);
257+
border-left: 2px solid rgba(255,0,0,.8);
258258
}
259259

260260
pre.compile_fail:hover, .information:hover + pre.compile_fail {
@@ -270,7 +270,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
270270
}
271271

272272
.tooltip.compile_fail {
273-
color: rgba(255,0,0,.6);
273+
color: rgba(255,0,0,.8);
274274
}
275275

276276
.information > .compile_fail:hover {
@@ -282,16 +282,17 @@ pre.ignore:hover, .information:hover + pre.ignore {
282282
}
283283

284284
.information > .ignore:hover {
285-
color: rgba(255,142,0,1);
285+
color: #ff9200;
286286
}
287287

288288
.search-failed a {
289289
color: #0089ff;
290290
}
291291

292292
.tooltip .tooltiptext {
293-
background-color: black;
293+
background-color: #000;
294294
color: #fff;
295+
border-color: #000;
295296
}
296297

297298
.tooltip .tooltiptext::after {

Diff for: src/librustdoc/html/static/themes/light.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -248,43 +248,43 @@ a.test-arrow:hover{
248248
}
249249

250250
pre.compile_fail {
251-
border-left: 2px solid rgba(255,0,0,.4);
251+
border-left: 2px solid rgba(255,0,0,.5);
252252
}
253253

254254
pre.compile_fail:hover, .information:hover + pre.compile_fail {
255255
border-left: 2px solid #f00;
256256
}
257257

258258
pre.ignore {
259-
border-left: 2px solid rgba(255,142,0,.4);
259+
border-left: 2px solid rgba(255,142,0,.6);
260260
}
261261

262262
pre.ignore:hover, .information:hover + pre.ignore {
263263
border-left: 2px solid #ff9200;
264264
}
265265

266266
.tooltip.compile_fail {
267-
color: rgba(255,0,0,.3);
267+
color: rgba(255,0,0,.5);
268268
}
269269

270270
.information > .compile_fail:hover {
271271
color: #f00;
272272
}
273273

274274
.tooltip.ignore {
275-
color: rgba(255,142,0,.3);
275+
color: rgba(255,142,0,.6);
276276
}
277277

278278
.information > .ignore:hover {
279-
color: rgba(255,142,0,1);
279+
color: #ff9200;
280280
}
281281

282282
.search-failed a {
283283
color: #0089ff;
284284
}
285285

286286
.tooltip .tooltiptext {
287-
background-color: black;
287+
background-color: #000;
288288
color: #fff;
289289
}
290290

0 commit comments

Comments
 (0)