mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-01 18:32:52 +02:00
65 lines
1.4 KiB
CSS
65 lines
1.4 KiB
CSS
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
.codeBlockContent {
|
|
position: relative;
|
|
}
|
|
|
|
.codeBlockTitle {
|
|
font-family: var(--ifm-font-family-monospace);
|
|
font-weight: bold;
|
|
padding: var(--ifm-pre-padding);
|
|
border-bottom: 1px solid var(--ifm-color-emphasis-200);
|
|
width: 100%;
|
|
}
|
|
|
|
.codeBlock {
|
|
overflow: auto;
|
|
}
|
|
|
|
.codeBlockWithTitle {
|
|
border-top-left-radius: 0;
|
|
border-top-right-radius: 0;
|
|
}
|
|
|
|
.copyButton {
|
|
background: rgba(0, 0, 0, 0.3);
|
|
border: none;
|
|
border-radius: var(--ifm-global-radius);
|
|
color: var(--ifm-color-content);
|
|
cursor: pointer;
|
|
line-height: 12px;
|
|
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;
|
|
}
|
|
|
|
.copyButtonWithTitle {
|
|
top: calc(var(--ifm-pre-padding));
|
|
}
|
|
|
|
.codeBlockTitle:hover + .codeBlockContent .copyButton,
|
|
.codeBlockContent:hover > .copyButton {
|
|
visibility: visible;
|
|
opacity: 1;
|
|
}
|
|
|
|
.codeBlockLines {
|
|
font-family: var(--ifm-font-family-monospace);
|
|
font-size: inherit;
|
|
line-height: var(--ifm-pre-line-height);
|
|
white-space: pre;
|
|
float: left;
|
|
min-width: 100%;
|
|
padding: var(--ifm-pre-padding);
|
|
}
|