Skip to content

Commit

Permalink
Merge pull request #30 from MartynKeigher/patch-2
Browse files Browse the repository at this point in the history
Show copy icon on hover
  • Loading branch information
valentine195 authored May 14, 2021
2 parents c7ed951 + f8ec984 commit 66932c8
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,28 @@
}

.admonition-content {
margin: 0 0.6rem;
position: relative;
margin: 10px 15px;
padding-right: 25px;
position: relative;
}

.admonition-content-copy {
position: absolute;
top: 0;
right: 0;
color: var(--text-faint);
cursor: pointer;
margin: -10px -2px;
color: var(--text-faint);
cursor: pointer;
opacity: 0;
position: absolute;
right: 0px;
top: 0;
transition: 0.3s all ease-in;
}

.admonition-content-copy:hover {
color: var(--text-normal);
color: var(--text-normal);
}

.admonition-content:hover > .admonition-content-copy,
.admonition-content-copy:hover {
opacity: 1;
}

details.admonition:not([open]) {
Expand Down

0 comments on commit 66932c8

Please sign in to comment.