Skip to content

Commit

Permalink
Fix copy icon on numbered code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Feb 9, 2024
1 parent 4437577 commit 649ac81
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions assets/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@
.markdown .highlight {
position: relative;

pre {
margin: 0;
}

code:first-child::before {
content: url('svg/copy-regular.svg');
width: 1rem;
height: 1rem;
content: "Copy";
font-size: 0;
background: no-repeat center url('svg/copy-regular.svg');
width: 1.4rem;
height: 1.4rem;
position: absolute;
right: 1rem;
top: 1.1rem;
top: 1rem;
display: inline-block;
opacity: 0.3;
transition: opacity 0.1s ease-in;
Expand Down

0 comments on commit 649ac81

Please sign in to comment.