CSS fix
This commit is contained in:
parent
e22061fc84
commit
4b6ba43c42
3 changed files with 31 additions and 11 deletions
|
@ -280,12 +280,18 @@ function registerPopper($trigger, $dropdown) {
|
|||
function populateCopyButton() {
|
||||
var copyButton;
|
||||
$('pre code').each(function () {
|
||||
var copyButton = $('<span>', {
|
||||
'class': 'btn-clipboard',
|
||||
'data-clipboard-text': $(this).text(),
|
||||
'title': 'Click to copy'
|
||||
}).append('<i class="fa fa-copy"></i>');
|
||||
|
||||
if ($(this).parent().width() > 100) {
|
||||
copyButton.append('<span style="margin-left: 2px">Copy</span>');
|
||||
}
|
||||
|
||||
$(this).before($('<div>', {'class': 'copy-clipboard'})
|
||||
.append(copyButton = $('<span>', {
|
||||
'class': 'btn-clipboard',
|
||||
'data-clipboard-text': $(this).text(),
|
||||
'title': 'Click to copy'
|
||||
}).append('<i class="fa fa-copy"></i><span style="margin-left: 2px">Copy</span>')));
|
||||
.append(copyButton));
|
||||
|
||||
$(copyButton.get(0)).mouseleave(function () {
|
||||
$(this).attr('class', 'btn-clipboard');
|
||||
|
|
|
@ -173,7 +173,7 @@ pre {
|
|||
|
||||
@media (min-width: 800px) {
|
||||
.content-description pre:has(code) {
|
||||
min-width: 20em;
|
||||
min-width: 3em;
|
||||
}
|
||||
#common-content {
|
||||
display: flex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue