Skip to content

Commit 6e05a71

Browse files
authored
Rollup merge of #85407 - GuillaumeGomez:copy-path-display-improvement, r=jsha
Improve display for "copy-path" button, making it more discreet As suggested by `@Nemo157` [here](#85118 (comment)): ![Screenshot from 2021-05-18 11-18-49](https://user-images.githubusercontent.com/3050060/118626882-899ddb00-b7cb-11eb-84c5-ef68dee5e351.png) ![Screenshot from 2021-05-18 11-15-06](https://user-images.githubusercontent.com/3050060/118626880-899ddb00-b7cb-11eb-95c1-2f3bacd22374.png) ![Screenshot from 2021-05-18 11-18-54](https://user-images.githubusercontent.com/3050060/118626885-8a367180-b7cb-11eb-870c-7acdf4259bef.png) ![Screenshot from 2021-05-18 11-15-00](https://user-images.githubusercontent.com/3050060/118626877-89054480-b7cb-11eb-9efc-9a0f153964ce.png) ![Screenshot from 2021-05-18 11-18-58](https://user-images.githubusercontent.com/3050060/118626888-8a367180-b7cb-11eb-91bb-47867cd0f2cc.png) ![Screenshot from 2021-05-18 11-19-00](https://user-images.githubusercontent.com/3050060/118626891-8acf0800-b7cb-11eb-9e3d-d2937b361524.png) r? `@jsha`
2 parents 27bc2b3 + 5d004c1 commit 6e05a71

File tree

4 files changed

+39
-13
lines changed

4 files changed

+39
-13
lines changed

src/librustdoc/html/static/rustdoc.css

+2-3
Original file line numberDiff line numberDiff line change
@@ -1268,12 +1268,11 @@ h4 > .notable-traits {
12681268
}
12691269

12701270
#copy-path {
1271+
background: initial;
12711272
margin-left: 10px;
12721273
padding: 0;
12731274
padding-left: 2px;
1274-
}
1275-
#copy-path> img {
1276-
margin-bottom: 2px;
1275+
border: 0;
12771276
}
12781277

12791278
#theme-choices {

src/librustdoc/html/static/themes/ayu.css

+13-4
Original file line numberDiff line numberDiff line change
@@ -516,20 +516,29 @@ kbd {
516516
box-shadow-color: #c6cbd1;
517517
}
518518

519-
#theme-picker, #settings-menu, #help-button, #copy-path {
519+
#theme-picker, #settings-menu, #help-button {
520520
border-color: #5c6773;
521521
background-color: #0f1419;
522522
color: #fff;
523523
}
524524

525-
#theme-picker > img, #settings-menu > img, #copy-path > img {
525+
#theme-picker > img, #settings-menu > img {
526526
filter: invert(100);
527527
}
528528

529+
#copy-path {
530+
color: #fff;
531+
}
532+
#copy-path > img {
533+
filter: invert(70%);
534+
}
535+
#copy-path:hover > img {
536+
filter: invert(100%);
537+
}
538+
529539
#theme-picker:hover, #theme-picker:focus,
530540
#settings-menu:hover, #settings-menu:focus,
531-
#help-button:hover, #help-button:focus,
532-
#copy-path:hover, #copy-path:focus {
541+
#help-button:hover, #help-button:focus {
533542
border-color: #e0e0e0;
534543
}
535544

src/librustdoc/html/static/themes/dark.css

+12-3
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,28 @@ kbd {
396396
box-shadow-color: #c6cbd1;
397397
}
398398

399-
#theme-picker, #settings-menu, #help-button, #copy-path {
399+
#theme-picker, #settings-menu, #help-button {
400400
border-color: #e0e0e0;
401401
background: #f0f0f0;
402402
color: #000;
403403
}
404404

405405
#theme-picker:hover, #theme-picker:focus,
406406
#settings-menu:hover, #settings-menu:focus,
407-
#help-button:hover, #help-button:focus,
408-
#copy-path:hover, #copy-path:focus {
407+
#help-button:hover, #help-button:focus {
409408
border-color: #ffb900;
410409
}
411410

411+
#copy-path {
412+
color: #999;
413+
}
414+
#copy-path > img {
415+
filter: invert(50%);
416+
}
417+
#copy-path:hover > img {
418+
filter: invert(65%);
419+
}
420+
412421
#theme-choices {
413422
border-color: #e0e0e0;
414423
background-color: #353535;

src/librustdoc/html/static/themes/light.css

+12-3
Original file line numberDiff line numberDiff line change
@@ -388,18 +388,27 @@ kbd {
388388
box-shadow-color: #c6cbd1;
389389
}
390390

391-
#theme-picker, #settings-menu, #help-button, #copy-path {
391+
#theme-picker, #settings-menu, #help-button {
392392
border-color: #e0e0e0;
393393
background-color: #fff;
394394
}
395395

396396
#theme-picker:hover, #theme-picker:focus,
397397
#settings-menu:hover, #settings-menu:focus,
398-
#help-button:hover, #help-button:focus,
399-
#copy-path:hover, #copy-path:focus {
398+
#help-button:hover, #help-button:focus {
400399
border-color: #717171;
401400
}
402401

402+
#copy-path {
403+
color: #999;
404+
}
405+
#copy-path > img {
406+
filter: invert(50%);
407+
}
408+
#copy-path:hover > img {
409+
filter: invert(35%);
410+
}
411+
403412
#theme-choices {
404413
border-color: #ccc;
405414
background-color: #fff;

0 commit comments

Comments
 (0)