mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +02:00
fix(v2): synchronize code block components changes (#2509)
This commit is contained in:
parent
9cff1bb9e4
commit
44f9c76851
3 changed files with 118 additions and 9 deletions
|
@ -229,7 +229,7 @@ export default ({children, className: languageClassName, metastring}) => {
|
|||
onClick={handleCopyCode}>
|
||||
{showCopied ? 'Copied' : 'Copy'}
|
||||
</button>
|
||||
<pre
|
||||
<div
|
||||
tabIndex="0"
|
||||
className={classnames(className, styles.codeBlock, {
|
||||
[styles.codeBlockWithTitle]: codeBlockTitle,
|
||||
|
@ -255,7 +255,7 @@ export default ({children, className: languageClassName, metastring}) => {
|
|||
);
|
||||
})}
|
||||
</div>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
|
||||
.codeBlock {
|
||||
overflow: auto;
|
||||
display: block;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.codeBlockWithTitle {
|
||||
|
@ -58,9 +55,10 @@
|
|||
}
|
||||
|
||||
.codeBlockLines {
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue