MediaWiki:Gadget-ohc-copy-code.css
MediaWiki interface page
More languages
More actions
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* ohc-copy-code — pill "Copy" buttons on code blocks (OHC teal) */
pre.ohc-copy-code {
position: relative;
}
pre.ohc-copy-code .ohc-copy-btn {
position: absolute;
top: 0.55em;
right: 0.55em;
z-index: 1;
font-family: 'Switzer', 'Figtree', system-ui, sans-serif;
font-size: 0.72em;
font-weight: 600;
line-height: 1;
padding: 0.4em 0.8em;
border-radius: 999px;
cursor: pointer;
color: #0f8b6c;
background: rgba(247, 249, 246, 0.92);
border: 1px solid #d8e1db;
box-shadow: 0 1px 3px rgba(23, 61, 52, 0.12);
transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
pre.ohc-copy-code .ohc-copy-btn:hover {
background: #0f8b6c;
color: #ffffff;
transform: translateY(-1px);
}
pre.ohc-copy-code .ohc-copy-btn.ohc-copied {
background: #12806a;
color: #ffffff;
}
@media (prefers-reduced-motion: reduce) {
pre.ohc-copy-code .ohc-copy-btn {
transition: none;
}
}