Skip to content

Commit 9fd43f8

Browse files
authored
feat: add hover transition for icon links (#984)
1 parent b6d6abe commit 9fd43f8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/sass/_base.scss

+9
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ svg.gdoc-icon {
438438
width: 1.85em;
439439
height: 1.85em;
440440
color: transparent;
441+
transition: color 0.2s ease-in-out;
441442
}
442443

443444
&:focus {
@@ -531,12 +532,20 @@ svg.gdoc-icon {
531532
position: relative;
532533

533534
&:hover > .gdoc-post__codecopy {
535+
opacity: 1;
534536
visibility: visible;
537+
pointer-events: auto;
535538
}
536539
}
537540

538541
&__codecopy {
542+
opacity: 0;
539543
visibility: hidden;
544+
transition:
545+
opacity 0.2s ease,
546+
visibility 0.2s ease;
547+
pointer-events: none;
548+
540549
position: absolute;
541550
top: defaults.$padding-8;
542551
right: defaults.$padding-8;

0 commit comments

Comments
 (0)