mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-31 02:59:43 +02:00
feat: add copy button to code block
This commit is contained in:
parent
dc0c32a93f
commit
1c3ada993e
2 changed files with 29 additions and 4 deletions
|
@ -149,8 +149,18 @@
|
|||
* ==================
|
||||
*/
|
||||
.block-code {
|
||||
@apply --text-code-block;
|
||||
@apply --squircle;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
.block-code__copy-button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
@apply --text-code-block;
|
||||
@apply --squircle;
|
||||
}
|
||||
|
||||
&__content {
|
||||
display: inline-block !important;
|
||||
|
@ -169,6 +179,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
&__copy-button {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.hljs-params {
|
||||
color: var(--color-code-params);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue