MediaWiki:Common.css
MediaWiki interface page
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.
/* =============================================================================
MediaWiki:Common.css
UnfinishedProjects Wiki
TABLE OF CONTENTS
0. Nav Forum Link
1. Brand Variables
2. Callout Boxes
3. Badges
4. Table Utilities
5. Text Utilities
6. Category Pages
7. Tag-Based Hub
============================================================================= */
/* =============================================================================
0. Forum Link
Forum header link — Gadget-sitenav.js
============================================================================= */
.citizen-forum-link {
background: var(--wiki-primary-subtle) !important;
border: 1px solid var(--wiki-primary) !important;
border-radius: 20px !important;
color: var(--wiki-primary) !important;
transition: background 0.15s, color 0.15s !important;
}
.citizen-forum-link:hover {
background: var(--wiki-primary) !important;
color: #fff !important;
}
.citizen-forum-link:hover .citizen-ui-icon {
filter: brightness(0) invert(1);
}
/* =============================================================================
1. BRAND VARIABLES
Edit only these lines to retheme the entire wiki.
subtle = primary at ~12% opacity (tag backgrounds, tints)
overlay = primary at ~92% opacity (card hover overlays)
============================================================================= */
:root {
--wiki-primary: #e46419;
--wiki-primary-subtle: rgba(228, 100, 25, 0.12);
--wiki-primary-overlay: rgba(228, 100, 25, 0.92);
--wiki-secondary: #3465a4;
--wiki-secondary-subtle: rgba(52, 101, 164, 0.12);
--wiki-secondary-overlay: rgba(52, 101, 164, 0.92);
}
/* =============================================================================
2. CALLOUT BOXES
Light mode uses tinted backgrounds.
Dark mode desaturates them so they don't glow on dark surfaces.
============================================================================= */
.box-info,
.box-warning,
.box-danger,
.box-success {
padding: 12px 16px;
margin: 12px 0;
border-radius: 0 4px 4px 0;
color: var(--color-base);
}
.box-info { background: #e8f4fd; border-left: 4px solid #2196F3; }
.box-warning { background: #fff3cd; border-left: 4px solid #ffc107; }
.box-danger { background: #f8d7da; border-left: 4px solid #dc3545; }
.box-success { background: #d4edda; border-left: 4px solid #28a745; }
.box-neutral {
background: var(--color-surface-2);
border: 1px solid var(--border-color-base);
padding: 14px 18px;
margin: 12px 0;
border-radius: 4px;
color: var(--color-base);
}
.skin-theme-clientpref-night .box-info { background: rgba(33, 150, 243, 0.15); }
.skin-theme-clientpref-night .box-warning { background: rgba(255, 193, 7, 0.15); }
.skin-theme-clientpref-night .box-danger { background: rgba(220, 53, 69, 0.15); }
.skin-theme-clientpref-night .box-success { background: rgba(40, 167, 69, 0.15); }
@media (prefers-color-scheme: dark) {
.skin-theme-clientpref-os .box-info { background: rgba(33, 150, 243, 0.15); }
.skin-theme-clientpref-os .box-warning { background: rgba(255, 193, 7, 0.15); }
.skin-theme-clientpref-os .box-danger { background: rgba(220, 53, 69, 0.15); }
.skin-theme-clientpref-os .box-success { background: rgba(40, 167, 69, 0.15); }
}
/* =============================================================================
3. BADGES
============================================================================= */
.badge {
display: inline-block;
padding: 2px 9px;
border-radius: 3px;
font-size: 85%;
font-weight: bold;
line-height: 1.4;
}
.badge-green { background: #28a745; color: #fff; }
.badge-red { background: #dc3545; color: #fff; }
.badge-yellow { background: #ffc107; color: #212529; }
.badge-blue { background: #17a2b8; color: #fff; }
.badge-grey { background: #6c757d; color: #fff; }
.badge-dark { background: #3d3d3d; color: #fff; }
/* =============================================================================
4. TABLE UTILITIES
============================================================================= */
.table-full { width: 100%; }
.row-green { background: #d4edda !important; }
.row-yellow { background: #fff3cd !important; }
.row-red { background: #f8d7da !important; }
.row-blue { background: #e8f4fd !important; }
.row-grey { background: #e9ecef !important; }
.skin-theme-clientpref-night .row-green { background: rgba(40, 167, 69, 0.2) !important; }
.skin-theme-clientpref-night .row-yellow { background: rgba(255, 193, 7, 0.2) !important; }
.skin-theme-clientpref-night .row-red { background: rgba(220, 53, 69, 0.2) !important; }
.skin-theme-clientpref-night .row-blue { background: rgba(33, 150, 243, 0.2) !important; }
.skin-theme-clientpref-night .row-grey { background: rgba(108, 117, 125, 0.2) !important; }
@media (prefers-color-scheme: dark) {
.skin-theme-clientpref-os .row-green { background: rgba(40, 167, 69, 0.2) !important; }
.skin-theme-clientpref-os .row-yellow { background: rgba(255, 193, 7, 0.2) !important; }
.skin-theme-clientpref-os .row-red { background: rgba(220, 53, 69, 0.2) !important; }
.skin-theme-clientpref-os .row-blue { background: rgba(33, 150, 243, 0.2) !important; }
.skin-theme-clientpref-os .row-grey { background: rgba(108, 117, 125, 0.2) !important; }
}
/* =============================================================================
5. TEXT UTILITIES
============================================================================= */
.indent-1 { margin-left: 2em; }
.indent-2 { margin-left: 4em; }
.text-muted { color: var(--color-base--subtle); font-size: 90%; }
.text-small { font-size: 85%; }
.wiki-code {
background: var(--color-surface-2);
border: 1px solid var(--border-color-base);
border-radius: 3px;
padding: 1px 5px;
font-family: monospace;
font-size: 90%;
color: var(--color-base);
}
/* =============================================================================
6. CATEGORY PAGES
============================================================================= */
#mw-subcategories h2,
#mw-pages h2,
#mw-category-media h2 {
font-size: 1.1em;
font-weight: bold;
color: var(--wiki-primary);
border-bottom: 2px solid var(--wiki-primary);
padding-bottom: 6px;
margin-bottom: 16px;
}
/* Subcategories — displayed as prominent nav blocks above pages */
#mw-subcategories .mw-category-group ul {
list-style: none;
margin: 0 0 4px;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
#mw-subcategories .mw-category-group ul li {
margin: 0;
padding: 0;
}
#mw-subcategories .mw-category-group ul li a {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: var(--wiki-primary-subtle);
border: 1px solid var(--wiki-primary);
border-radius: 4px;
font-size: 0.9em;
font-weight: bold;
color: var(--wiki-primary);
text-decoration: none;
transition: background 0.15s, color 0.15s;
}
#mw-subcategories .mw-category-group ul li a:hover {
background: var(--wiki-primary);
color: #fff;
text-decoration: none;
}
/* Letter group heading */
.mw-category-group h3 {
font-size: 0.75em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--color-base--subtle);
border: none;
margin: 20px 0 8px;
padding: 0;
}
/* Pages — chip layout */
#mw-pages .mw-category-group ul {
list-style: none;
margin: 0 0 4px;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
#mw-pages .mw-category-group ul li {
margin: 0;
padding: 0;
}
#mw-pages .mw-category-group ul li a {
display: flex;
flex-direction: column;
padding: 7px 14px;
min-width: 140px;
max-width: 240px;
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 4px;
font-size: 0.88em;
color: var(--color-base);
text-decoration: none;
transition: background 0.15s, border-color 0.15s;
line-height: 1.4;
position: relative;
}
#mw-pages .mw-category-group ul li a:hover {
background: var(--color-surface-2);
border-color: var(--wiki-primary);
text-decoration: none;
}
#mw-pages .mw-category-group ul li a .cat-item-name {
font-weight: 600;
color: var(--color-base);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#mw-pages .mw-category-group ul li a .cat-item-meta {
font-size: 0.82em;
color: var(--color-base--subtle);
margin-top: 2px;
white-space: nowrap;
}
/* Loading shimmer on meta line until API responds */
#mw-pages .mw-category-group ul li a .cat-item-meta:not(.loaded) {
background: var(--color-surface-2);
border-radius: 3px;
color: transparent;
width: 80px;
height: 0.75em;
display: inline-block;
animation: cat-shimmer 1.4s infinite;
}
@keyframes cat-shimmer {
0% { opacity: 0.4; }
50% { opacity: 0.9; }
100% { opacity: 0.4; }
}
/* Red links */
#mw-pages .mw-category-group ul li a.new {
border-style: dashed;
opacity: 0.6;
}
#mw-pages .mw-category-group ul li a.new:hover {
border-color: var(--border-color-base);
background: var(--color-surface-1);
}
/* Search bar injected by JS */
.cat-search-wrap {
margin-bottom: 20px;
}
.cat-search-input {
width: 100%;
max-width: 400px;
padding: 7px 14px;
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 4px;
font-size: 0.9em;
color: var(--color-base);
box-sizing: border-box;
outline: none;
transition: border-color 0.15s;
}
.cat-search-input:focus {
border-color: var(--wiki-primary);
}
.cat-search-count {
margin-left: 10px;
font-size: 0.85em;
color: var(--color-base--subtle);
}
/* Page count note */
#mw-pages p,
#mw-subcategories p {
font-size: 0.88em;
color: var(--color-base--subtle);
margin-bottom: 12px;
}
/* =============================================================================
7. Tag-Based Hub — new styles added for unified Projects/Tutorials hubs
============================================================================= */
/* Hub wrapper */
.project-hub-wrapper,
.tutorial-hub-wrapper {
margin-top: 8px;
}
/* Filter bar (search, sort, count) */
.project-hub-filters,
.tutorial-hub-filters {
background-color: var(--color-surface-2);
border: 1px solid var(--border-color-base);
border-radius: 4px;
padding: 12px 16px;
margin-bottom: 12px;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.project-hub-search {
flex: 1;
min-width: 200px;
padding: 6px 10px;
border: 1px solid var(--border-color-base);
border-radius: 3px;
font-size: 0.9em;
color: var(--color-base);
background-color: var(--color-surface-1);
outline: none;
transition: border-color 0.15s;
}
.project-hub-search:focus { border-color: var(--wiki-primary); }
.project-hub-select {
padding: 6px 10px;
border: 1px solid var(--border-color-base);
border-radius: 3px;
font-size: 0.88em;
color: var(--color-base);
background-color: var(--color-surface-1);
outline: none;
cursor: pointer;
transition: border-color 0.15s;
}
.project-hub-select:focus { border-color: var(--wiki-primary); }
.project-hub-count,
.tutorial-hub-count {
font-size: 0.82em;
color: var(--color-base--subtle);
margin-left: auto;
white-space: nowrap;
}
/* Tag cloud */
.project-hub-tagcloud,
.tutorial-hub-tagcloud {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 16px;
padding: 10px 14px;
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 4px;
}
/* Clickable tag — used in cloud AND on cards */
.js-tag-filter,
.js-tutorial-tag {
display: inline-block;
padding: 3px 10px;
background: var(--wiki-primary-subtle);
color: var(--wiki-primary);
border: 1px solid transparent;
border-radius: 20px;
font-size: 0.8em;
font-weight: 600;
cursor: pointer;
transition: background 0.12s, color 0.12s, border-color 0.12s;
user-select: none;
}
.js-tag-filter:hover,
.js-tutorial-tag:hover,
.js-tag-filter.is-active,
.js-tutorial-tag.is-active {
background: var(--wiki-primary);
color: #fff;
border-color: var(--wiki-primary);
}
/* Card grid */
.project-hub-grid,
.tutorial-hub-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
font-size: 0;
margin-bottom: 8px;
}
.project-hub-grid .project-card-wrap,
.tutorial-hub-grid .tutorial-card-wrap {
font-size: 1rem;
}
/* Empty state */
.project-hub-empty {
width: 100%;
text-align: center;
padding: 40px 20px;
color: var(--color-base--subtle);
font-size: 0.95em;
}
/* Load more button */
.project-hub-loadmore,
.tutorial-hub-loadmore {
display: block;
width: 100%;
margin: 8px 0 16px;
padding: 12px;
background: var(--color-surface-2);
border: 1px solid var(--border-color-base);
border-radius: 4px;
font-size: 0.9em;
font-weight: 700;
color: var(--color-base);
cursor: pointer;
text-align: center;
transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.project-hub-loadmore:hover,
.tutorial-hub-loadmore:hover {
border-color: var(--wiki-primary);
color: var(--wiki-primary);
background: var(--color-surface-1);
}