css: Display copy_codeblock button during hover only.

This commit is contained in:
Sumanth V Rao 2020-08-21 19:26:00 +05:30 committed by Tim Abbott
parent 3eddb0dd82
commit d9c4181243
1 changed files with 8 additions and 0 deletions

View File

@ -445,9 +445,17 @@
border: none; border: none;
} }
pre {
&:hover .copy_codeblock,
&:focus-within .copy_codeblock {
visibility: visible;
}
}
/* TODO: Consolidate with .copy_message */ /* TODO: Consolidate with .copy_message */
/* Style copy-to-clipboard button inside codeblocks */ /* Style copy-to-clipboard button inside codeblocks */
.copy_codeblock { .copy_codeblock {
visibility: hidden;
outline-color: hsl(0, 0%, 73%); outline-color: hsl(0, 0%, 73%);
height: 18px; height: 18px;
width: 10px; width: 10px;