MediaWiki:Common.css
Appearance
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.
/* CSS placed here will be applied to all skins */
#ca-nstab-main { display: none !important; }
#ca-nstab-user { display: none !important; }
#ca-talk { display: none !important; }
#ca-view { display: none !important; }
#ca-history { display: none !important;}
#ca-watch { display: none !important; }
#ca-unwatch { display: none !important; }
#ca-delete { display: none !important; }
#ca-move { display: none !important; }
#ca-protect { display: none !important; }
#ca-viewsource { display: none !important; }
/* Sticky Copy Button Styling */
.mw-highlight {
position: relative;
/* Ensure the container has a max-height or overflow for scrolling to trigger */
}
.copy-button {
position: sticky; /* This makes it follow the scroll */
top: 10px; /* Distance from the top of the scrollable area */
right: 10px; /* Pinned to the right */
float: right; /* Keeps it aligned to the right side */
margin-bottom: -40px; /* Offset to prevent pushing the code text down */
margin-right: 10px;
width: 34px;
height: 34px;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid #c8ccd1;
border-radius: 6px;
cursor: pointer;
z-index: 100; /* Ensure it stays above the code lines */
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
transition: background-color 0.2s, opacity 0.2s;
}
/* Make it look interactive */
.copy-button:hover {
background-color: #ffffff;
border-color: #36c;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.copy-button svg {
color: #54595d;
}
/* Hide button when not hovering over the code block (optional) */
.mw-highlight .copy-button {
opacity: 0.3;
}
.mw-highlight:hover .copy-button {
opacity: 1;
}
/* Avoid showing button during print */
@media print {
.copy-button { display: none; }
}