fix(v2): various improvements for accessibility (#2480)

This commit is contained in:
Alexey Pyltsyn 2020-03-29 18:35:58 +03:00 committed by GitHub
parent 8fe203d529
commit c299baa80b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 169 additions and 161 deletions

View file

@ -137,7 +137,7 @@ export default ({
onClick={handleCopyCode}>
{showCopied ? 'Copied' : 'Copy'}
</button>
<pre
<div
tabIndex="0"
className={classnames(className, styles.codeBlock, {
[styles.codeBlockWithTitle]: codeBlockTitle,
@ -163,7 +163,7 @@ export default ({
);
})}
</div>
</pre>
</div>
</div>
</>
)}

View file

@ -20,9 +20,6 @@
.codeBlock {
overflow: auto;
display: block;
padding: 0;
margin: 0;
}
.codeBlockWithTitle {
@ -59,9 +56,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);