mediawiki-extensions-Syntax.../modules/pygments.copy.css
Siddharth VP 55630cc5ea Implement copy buttons for code blocks
<syntaxhighlight> blocks with a boolean "copy" param will now have a
button next to them for copying the code to the clipboard. Not
applicable for inline code blocks.

Adapted from the mediawiki.org gadget written by Krinkle.

Bug: T40932
Change-Id: Ic8ef030514c3b6dd2cb9b137f032588869ab3762
2024-09-11 01:31:14 +05:30

39 lines
775 B
CSS

/**
* Adapted from https://www.mediawiki.org/wiki/MediaWiki:Gadget-site-tpl-copy.css
* Original author: Krinkle
*/
.mw-highlight-copy {
position: relative;
min-width: 40%;
max-width: max-content;
}
/**
* https://doc.wikimedia.org/oojs-ui/master/demos/ (2023-11-13)
* https://design.wikimedia.org/style-guide/components/buttons.html
*/
.mw-highlight-copy--bound button {
position: absolute;
top: -1em;
right: -0.9em;
box-sizing: border-box;
padding: 5px 7px;
border-radius: 2px;
background: #fff;
color: #36c;
border: 1px solid #eaecf0;
}
.mw-highlight-copy--bound button:hover {
cursor: pointer;
background: #fff;
border: 1px solid #447ff5;
}
.mw-highlight-copy--bound button:active {
background: #eff3fa;
color: #2a4b8d;
border-color: #2a4b8d;
}