Jump to content

MediaWiki:Common.css: Difference between revisions

From IoT Colabs Wiki
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
/* Hide the site name/text under the logo */
#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; }
}

Latest revision as of 10:06, 6 May 2026

/* 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; }
}