mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
misc(v2): make playground nicer (#1819)
* misc(v2): make code block nicer * misc(v2): update changelog for code + playground * misc(v2): update playground docs
This commit is contained in:
parent
ae678c9dad
commit
1c5a6ee244
13 changed files with 75 additions and 55 deletions
|
@ -1,6 +1,5 @@
|
|||
.codeBlock {
|
||||
border-radius: 0;
|
||||
font-size: inherit;
|
||||
margin-bottom: 0;
|
||||
overflow: hidden;
|
||||
overflow-wrap: break-word;
|
||||
|
@ -12,25 +11,24 @@
|
|||
}
|
||||
|
||||
.codeBlockWrapper:hover > .copyButton {
|
||||
bottom: calc(var(--ifm-pre-padding) - 2px);
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.copyButton {
|
||||
position: absolute;
|
||||
right: var(--ifm-pre-padding);
|
||||
bottom: calc(var(--ifm-pre-padding) - 4px);
|
||||
padding: 4px 8px;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 200ms ease-in-out, visibility 200ms ease-in-out,
|
||||
bottom 200ms ease-in-out;
|
||||
background: rgb(1, 22, 39);
|
||||
border: 1px solid rgb(214, 222, 235);
|
||||
border-radius: var(--ifm-global-radius);
|
||||
outline: none;
|
||||
color: rgb(214, 222, 235);
|
||||
cursor: pointer;
|
||||
line-height: 12px;
|
||||
background: rgb(1, 22, 39);
|
||||
color: rgb(214, 222, 235);
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
padding: 4px 8px;
|
||||
position: absolute;
|
||||
right: var(--ifm-pre-padding);
|
||||
top: var(--ifm-pre-padding);
|
||||
visibility: hidden;
|
||||
transition: opacity 200ms ease-in-out, visibility 200ms ease-in-out,
|
||||
bottom 200ms ease-in-out;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue