MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 56: | Line 56: | ||
background-color: #222; /* Dark background */ | background-color: #222; /* Dark background */ | ||
color: white; | color: white; | ||
} | |||
/* | |||
============================================================================= | |||
INFOBOX & CARDS CSS ENHANCEMENTS | |||
============================================================================= | |||
Copy this to your wiki's MediaWiki:Common.css page for enhanced styling. | |||
This is OPTIONAL - the templates work with inline styles alone. | |||
============================================================================= | |||
*/ | |||
/* ===== INFOBOX STYLES ===== */ | |||
.infobox { | |||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |||
} | |||
.infobox th[colspan="2"] { | |||
text-transform: uppercase; | |||
letter-spacing: 0.5px; | |||
} | |||
/* Hover effect for infobox */ | |||
.infobox:hover { | |||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); | |||
} | |||
/* Alternating row colors (optional) */ | |||
.infobox tr:nth-child(even) td { | |||
background-color: #fafafa; | |||
} | |||
/* ===== CARD STYLES ===== */ | |||
.cards-container { | |||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |||
} | |||
/* Card hover effects */ | |||
.card-item:hover, | |||
.single-card:hover { | |||
transform: translateY(-3px); | |||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important; | |||
transition: all 0.2s ease; | |||
} | |||
/* Dark style hover */ | |||
.card-item[style*="2a2a2a"]:hover, | |||
.single-card[style*="2a2a2a"]:hover { | |||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important; | |||
} | |||
/* Card image zoom on hover */ | |||
.card-item:hover .card-image img, | |||
.single-card:hover .card-image img { | |||
transform: scale(1.05); | |||
transition: transform 0.3s ease; | |||
} | |||
/* Card title link styling */ | |||
.card-title a { | |||
color: inherit; | |||
text-decoration: none; | |||
} | |||
.card-title a:hover { | |||
color: #3366cc; | |||
} | |||
/* ===== RESPONSIVE ADJUSTMENTS ===== */ | |||
/* Mobile: Stack cards vertically */ | |||
@media screen and (max-width: 600px) { | |||
.infobox { | |||
float: none !important; | |||
width: 100% !important; | |||
margin: 1em 0 !important; | |||
} | |||
.cards-container { | |||
justify-content: center !important; | |||
} | |||
.card-item, | |||
.single-card { | |||
width: 100% !important; | |||
max-width: 300px; | |||
} | |||
} | |||
/* ===== DARK MODE SUPPORT ===== */ | |||
/* If your wiki uses a dark mode class on body */ | |||
.dark-mode .infobox, | |||
body.skin-fandomdesktop-dark .infobox { | |||
background-color: #1f1f1f; | |||
border-color: #444; | |||
color: #e0e0e0; | |||
} | |||
.dark-mode .infobox th, | |||
body.skin-fandomdesktop-dark .infobox th { | |||
background-color: #2a2a2a; | |||
color: #ffffff; | |||
} | |||
.dark-mode .infobox th[colspan="2"], | |||
body.skin-fandomdesktop-dark .infobox th[colspan="2"] { | |||
background-color: #3366cc; | |||
} | |||
.dark-mode .card-item:not([style*="2a2a2a"]), | |||
body.skin-fandomdesktop-dark .card-item:not([style*="2a2a2a"]) { | |||
background-color: #2a2a2a !important; | |||
border-color: #444 !important; | |||
} | |||
.dark-mode .card-title, | |||
body.skin-fandomdesktop-dark .card-title { | |||
color: #ffffff !important; | |||
} | |||
.dark-mode .card-text, | |||
body.skin-fandomdesktop-dark .card-text { | |||
color: #cccccc !important; | |||
} | |||
/* ===== CUSTOM COLOR THEMES ===== */ | |||
/* Add these classes to your infobox wrapper for different colors */ | |||
.infobox-blue th[colspan="2"]:first-child { | |||
background-color: #3366cc !important; | |||
} | |||
.infobox-red th[colspan="2"]:first-child { | |||
background-color: #cc3333 !important; | |||
} | |||
.infobox-green th[colspan="2"]:first-child { | |||
background-color: #33aa33 !important; | |||
} | |||
.infobox-purple th[colspan="2"]:first-child { | |||
background-color: #9933cc !important; | |||
} | |||
.infobox-orange th[colspan="2"]:first-child { | |||
background-color: #ff9900 !important; | |||
} | |||
.infobox-gold th[colspan="2"]:first-child { | |||
background-color: #c9a227 !important; | |||
} | } | ||
Revision as of 19:11, 24 January 2026
/* --- Fandom Style Cards --- */
.card-grid {
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: center; /* Centers them on the page */
}
.fandom-card {
background: #1a1a1a; /* Dark grey background */
border: 1px solid #333;
border-radius: 8px; /* Rounded corners */
width: 220px; /* Width of each card */
overflow: hidden;
transition: transform 0.2s, box-shadow 0.2s;
text-align: center;
}
/* Hover Effect (Makes it pop up) */
.fandom-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.5);
border-color: #a855f7; /* Purple glow */
}
/* Image styling */
.fandom-card img {
width: 100%;
height: 120px;
object-fit: cover;
}
/* Text styling */
.fandom-card-text {
padding: 10px;
color: white;
}
.fandom-card-title {
font-weight: bold;
font-size: 1.1em;
display: block;
margin-bottom: 5px;
}
/* Style for Infobox Aura */
.pi-theme-aura .pi-header {
background-color: #6a0dad; /* Purple header */
color: white;
font-weight: bold;
text-transform: uppercase;
}
.pi-theme-aura {
border: 1px solid #444;
background-color: #222; /* Dark background */
color: white;
}
/*
=============================================================================
INFOBOX & CARDS CSS ENHANCEMENTS
=============================================================================
Copy this to your wiki's MediaWiki:Common.css page for enhanced styling.
This is OPTIONAL - the templates work with inline styles alone.
=============================================================================
*/
/* ===== INFOBOX STYLES ===== */
.infobox {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.infobox th[colspan="2"] {
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* Hover effect for infobox */
.infobox:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Alternating row colors (optional) */
.infobox tr:nth-child(even) td {
background-color: #fafafa;
}
/* ===== CARD STYLES ===== */
.cards-container {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Card hover effects */
.card-item:hover,
.single-card:hover {
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
transition: all 0.2s ease;
}
/* Dark style hover */
.card-item[style*="2a2a2a"]:hover,
.single-card[style*="2a2a2a"]:hover {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}
/* Card image zoom on hover */
.card-item:hover .card-image img,
.single-card:hover .card-image img {
transform: scale(1.05);
transition: transform 0.3s ease;
}
/* Card title link styling */
.card-title a {
color: inherit;
text-decoration: none;
}
.card-title a:hover {
color: #3366cc;
}
/* ===== RESPONSIVE ADJUSTMENTS ===== */
/* Mobile: Stack cards vertically */
@media screen and (max-width: 600px) {
.infobox {
float: none !important;
width: 100% !important;
margin: 1em 0 !important;
}
.cards-container {
justify-content: center !important;
}
.card-item,
.single-card {
width: 100% !important;
max-width: 300px;
}
}
/* ===== DARK MODE SUPPORT ===== */
/* If your wiki uses a dark mode class on body */
.dark-mode .infobox,
body.skin-fandomdesktop-dark .infobox {
background-color: #1f1f1f;
border-color: #444;
color: #e0e0e0;
}
.dark-mode .infobox th,
body.skin-fandomdesktop-dark .infobox th {
background-color: #2a2a2a;
color: #ffffff;
}
.dark-mode .infobox th[colspan="2"],
body.skin-fandomdesktop-dark .infobox th[colspan="2"] {
background-color: #3366cc;
}
.dark-mode .card-item:not([style*="2a2a2a"]),
body.skin-fandomdesktop-dark .card-item:not([style*="2a2a2a"]) {
background-color: #2a2a2a !important;
border-color: #444 !important;
}
.dark-mode .card-title,
body.skin-fandomdesktop-dark .card-title {
color: #ffffff !important;
}
.dark-mode .card-text,
body.skin-fandomdesktop-dark .card-text {
color: #cccccc !important;
}
/* ===== CUSTOM COLOR THEMES ===== */
/* Add these classes to your infobox wrapper for different colors */
.infobox-blue th[colspan="2"]:first-child {
background-color: #3366cc !important;
}
.infobox-red th[colspan="2"]:first-child {
background-color: #cc3333 !important;
}
.infobox-green th[colspan="2"]:first-child {
background-color: #33aa33 !important;
}
.infobox-purple th[colspan="2"]:first-child {
background-color: #9933cc !important;
}
.infobox-orange th[colspan="2"]:first-child {
background-color: #ff9900 !important;
}
.infobox-gold th[colspan="2"]:first-child {
background-color: #c9a227 !important;
}