File tree 2 files changed +12
-25
lines changed
src/librustdoc/html/static
2 files changed +12
-25
lines changed Original file line number Diff line number Diff line change @@ -1627,24 +1627,27 @@ a.tooltip:hover::after {
1627
1627
color : var (--copy-path-button-color );
1628
1628
background : var (--main-background-color );
1629
1629
height : 34px ;
1630
+ width : 33px ;
1630
1631
margin-left : 10px ;
1631
1632
padding : 0 ;
1632
1633
padding-left : 2px ;
1633
1634
border : 0 ;
1634
- width : 33px ;
1635
- line-height : 0 ;
1636
1635
font-size : 0 ;
1637
1636
}
1638
-
1639
- # copy-path : before {
1637
+ # copy-path ::before {
1640
1638
filter : var (--copy-path-img-filter );
1641
1639
content : url ('clipboard-24048e6d87f63d07.svg' );
1642
- width : 19px ;
1643
- height : 18px ;
1644
1640
}
1645
- # copy-path : hover : before {
1641
+ # copy-path : hover :: before {
1646
1642
filter : var (--copy-path-img-hover-filter );
1647
1643
}
1644
+ # copy-path .clicked ::before {
1645
+ /* Checkmark <https://www.svgrepo.com/svg/335033/checkmark> */
1646
+ content : url ('data:image/svg+xml,<svg viewBox="-1 -1 23 23" xmlns="http://www.w3.org/2000/svg" \
1647
+ fill= "black" height="18px">\
1648
+ <g> <path d= "M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414" > </path>\
1649
+ </ g></svg>');
1650
+ }
1648
1651
1649
1652
@keyframes rotating {
1650
1653
from {
Original file line number Diff line number Diff line change @@ -1797,31 +1797,15 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1797
1797
document . execCommand ( "copy" ) ;
1798
1798
document . body . removeChild ( el ) ;
1799
1799
1800
- // There is always one children, but multiple childNodes.
1801
- but . children [ 0 ] . style . display = "none" ;
1802
-
1803
- let tmp ;
1804
- if ( but . childNodes . length < 2 ) {
1805
- tmp = document . createTextNode ( "✓" ) ;
1806
- but . appendChild ( tmp ) ;
1807
- } else {
1808
- onEachLazy ( but . childNodes , e => {
1809
- if ( e . nodeType === Node . TEXT_NODE ) {
1810
- tmp = e ;
1811
- return true ;
1812
- }
1813
- } ) ;
1814
- tmp . textContent = "✓" ;
1815
- }
1800
+ but . classList . add ( "clicked" ) ;
1816
1801
1817
1802
if ( reset_button_timeout !== null ) {
1818
1803
window . clearTimeout ( reset_button_timeout ) ;
1819
1804
}
1820
1805
1821
1806
function reset_button ( ) {
1822
- tmp . textContent = "" ;
1823
1807
reset_button_timeout = null ;
1824
- but . children [ 0 ] . style . display = "" ;
1808
+ but . classList . remove ( "clicked" ) ;
1825
1809
}
1826
1810
1827
1811
reset_button_timeout = window . setTimeout ( reset_button , 1000 ) ;
You can’t perform that action at this time.
0 commit comments