MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* CSS placed here will be applied to all skins */ | /* CSS placed here will be applied to all skins */ | ||
/* Add any other common styles here that should apply to both desktop and mobile */ | /* Add any other common styles here that should apply to both desktop and mobile */ | ||
/* new front page CSS */ | |||
/* Hover effects for cards and buttons */ | |||
a[style*="display:inline-block"] { | |||
transition: transform 0.2s, box-shadow 0.2s; | |||
} | |||
a[style*="display:inline-block"]:hover { | |||
transform: translateY(-2px); | |||
box-shadow: 0 4px 8px rgba(0,0,0,0.1); | |||
} | |||
div[style*="box-shadow"]:hover { | |||
transform: translateY(-3px); | |||
box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important; | |||
transition: transform 0.3s, box-shadow 0.3s; | |||
} | |||
/* Mobile responsiveness improvements */ | |||
@media (max-width: 768px) { | |||
.desktop-view { | |||
display: none; | |||
} | |||
.mobile-view { | |||
display: block; | |||
} | |||
div[style*="column-count"] { | |||
column-count: 1 !important; | |||
} | |||
} | |||
@media (min-width: 769px) { | |||
.desktop-view { | |||
display: block; | |||
} | |||
.mobile-view { | |||
display: none; | |||
} | |||
} | |||
/* used by the front page start*/ | /* used by the front page start*/ |
Revision as of 01:40, 18 March 2025
/* CSS placed here will be applied to all skins */
/* Add any other common styles here that should apply to both desktop and mobile */
/* new front page CSS */
/* Hover effects for cards and buttons */
a[style*="display:inline-block"] {
transition: transform 0.2s, box-shadow 0.2s;
}
a[style*="display:inline-block"]:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
div[style*="box-shadow"]:hover {
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
transition: transform 0.3s, box-shadow 0.3s;
}
/* Mobile responsiveness improvements */
@media (max-width: 768px) {
.desktop-view {
display: none;
}
.mobile-view {
display: block;
}
div[style*="column-count"] {
column-count: 1 !important;
}
}
@media (min-width: 769px) {
.desktop-view {
display: block;
}
.mobile-view {
display: none;
}
}
/* used by the front page start*/
/* Default styles for desktop (769px or more) */
.desktop-view {
display: block;
}
.mobile-view {
display: none;
}
@media only screen and (max-width: 768px) {
.desktop-view { display: none !important; }
.mobile-view { display: block !important; }
}
/* used by the front page end*/
/* Infobox */
@media screen and (min-width: 769px) {
.infobox {
float: right;
margin: 0 0 1em 1em;
width: 350px;
}
}
/* ===============================
Global Reset & Basic Elements
=============================== */
body {
/* For a slight background color or subtle pattern, uncomment or adjust below: */
/* background-color: #f7f8fa; */
font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #333;
}
/* Give tables a bit more breathing room */
table {
border-collapse: separate;
border-spacing: 0.5em;
}
/* If your wiki has standard 'header' rows in tables, style them nicely */
table th {
background-color: #eee;
font-weight: bold;
padding: 0.5em;
border: 1px solid #ccc;
}
/* Standard table data cells */
table td {
background-color: #fff;
padding: 0.5em;
border: 1px solid #ccc;
}
/* Links (unvisited) */
a {
color: #2e86c1;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* ===============================
Headings
=============================== */
h1, .mw-headline {
color: #2c3e50;
font-weight: bold;
}
/* ===============================
Custom Classes for the Main Page
=============================== */
/* Hero Banner or Front-Page Banner */
.frontpage-hero {
text-align: center;
margin: 1em 0;
position: relative;
}
.frontpage-hero img {
max-width: 100%;
border-radius: 6px;
opacity: 0.9;
}
/* Optional text overlay if you use absolute positioning on your banner */
.hero-overlay-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
font-size: 2em;
}
/* Boxes or panels for sections (e.g. "News & Updates", "Getting Started") */
.mainpage-box {
background-color: #fefefe;
border: 1px solid #ccc;
padding: 1em;
border-radius: 5px;
}
/* A subtle highlight color for "featured" sections */
.featured-section {
background-color: #eff7ff;
border: 1px solid #bcdffd;
}
/* ===============================
Footer
=============================== */
#footer, .mw-footer {
text-align: center;
font-size: 0.9em;
color: #666;
margin-top: 2em;
}
/* ===============================
Mobile Responsiveness
=============================== */
@media screen and (max-width: 768px) {
/* Make tables more flexible on mobile, if needed */
table {
width: 100%;
overflow-x: auto;
display: block;
}
/* Example for front page columns turning into stacked blocks on mobile */
.mw-columns-2 {
display: block;
}
.mw-columns-2 > div {
width: 100% !important;
margin-bottom: 1em;
}
}
/* Remove header from the front page. */
body.page-Main_Page h1.firstHeading {
display: none;
}