Skip to content

Commit 5d004c1

Browse files
Improve display for "copy-path" button, making it more discrete
1 parent 44ec846 commit 5d004c1

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
@@ -1262,12 +1262,11 @@ h4 > .notable-traits {
12621262
}
12631263

12641264
#copy-path {
1265+
background: initial;
12651266
margin-left: 10px;
12661267
padding: 0;
12671268
padding-left: 2px;
1268-
}
1269-
#copy-path> img {
1270-
margin-bottom: 2px;
1269+
border: 0;
12711270
}
12721271

12731272
#theme-choices {

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

+13-4
Original file line numberDiff line numberDiff line change
@@ -502,20 +502,29 @@ kbd {
502502
box-shadow-color: #c6cbd1;
503503
}
504504

505-
#theme-picker, #settings-menu, #help-button, #copy-path {
505+
#theme-picker, #settings-menu, #help-button {
506506
border-color: #5c6773;
507507
background-color: #0f1419;
508508
color: #fff;
509509
}
510510

511-
#theme-picker > img, #settings-menu > img, #copy-path > img {
511+
#theme-picker > img, #settings-menu > img {
512512
filter: invert(100);
513513
}
514514

515+
#copy-path {
516+
color: #fff;
517+
}
518+
#copy-path > img {
519+
filter: invert(70%);
520+
}
521+
#copy-path:hover > img {
522+
filter: invert(100%);
523+
}
524+
515525
#theme-picker:hover, #theme-picker:focus,
516526
#settings-menu:hover, #settings-menu:focus,
517-
#help-button:hover, #help-button:focus,
518-
#copy-path:hover, #copy-path:focus {
527+
#help-button:hover, #help-button:focus {
519528
border-color: #e0e0e0;
520529
}
521530

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

+12-3
Original file line numberDiff line numberDiff line change
@@ -392,19 +392,28 @@ kbd {
392392
box-shadow-color: #c6cbd1;
393393
}
394394

395-
#theme-picker, #settings-menu, #help-button, #copy-path {
395+
#theme-picker, #settings-menu, #help-button {
396396
border-color: #e0e0e0;
397397
background: #f0f0f0;
398398
color: #000;
399399
}
400400

401401
#theme-picker:hover, #theme-picker:focus,
402402
#settings-menu:hover, #settings-menu:focus,
403-
#help-button:hover, #help-button:focus,
404-
#copy-path:hover, #copy-path:focus {
403+
#help-button:hover, #help-button:focus {
405404
border-color: #ffb900;
406405
}
407406

407+
#copy-path {
408+
color: #999;
409+
}
410+
#copy-path > img {
411+
filter: invert(50%);
412+
}
413+
#copy-path:hover > img {
414+
filter: invert(65%);
415+
}
416+
408417
#theme-choices {
409418
border-color: #e0e0e0;
410419
background-color: #353535;

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

+12-3
Original file line numberDiff line numberDiff line change
@@ -384,18 +384,27 @@ kbd {
384384
box-shadow-color: #c6cbd1;
385385
}
386386

387-
#theme-picker, #settings-menu, #help-button, #copy-path {
387+
#theme-picker, #settings-menu, #help-button {
388388
border-color: #e0e0e0;
389389
background-color: #fff;
390390
}
391391

392392
#theme-picker:hover, #theme-picker:focus,
393393
#settings-menu:hover, #settings-menu:focus,
394-
#help-button:hover, #help-button:focus,
395-
#copy-path:hover, #copy-path:focus {
394+
#help-button:hover, #help-button:focus {
396395
border-color: #717171;
397396
}
398397

398+
#copy-path {
399+
color: #999;
400+
}
401+
#copy-path > img {
402+
filter: invert(50%);
403+
}
404+
#copy-path:hover > img {
405+
filter: invert(35%);
406+
}
407+
399408
#theme-choices {
400409
border-color: #ccc;
401410
background-color: #fff;

0 commit comments

Comments
 (0)