MediaWiki:Common.css: Difference between revisions
From Cramsession
Jump to navigationJump to search
(Created page with "→CSS placed here will be applied to all skins: →Style the main page InputBox wrapper: .mw-inputbox-form { display: flex; justify-content: center; align-items: center; gap: 10px; } →Make the text input field look modern and spacious: .mw-inputbox-form input[type="text"], .mw-inputbox-form input[type="search"] { padding: 12px 20px; font-size: 16px; border: 2px solid #ddd; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,...") |
No edit summary |
||
| Line 41: | Line 41: | ||
.mw-inputbox-form input[type="submit"]:hover { | .mw-inputbox-form input[type="submit"]:hover { | ||
background-color: #1a252f; | background-color: #1a252f; | ||
} | |||
/* 1. Turn the standard list into a responsive CSS Grid */ | |||
.cram-latest-grid ul { | |||
display: grid; | |||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); | |||
gap: 20px; | |||
list-style: none !important; | |||
margin: 20px 0 !important; | |||
padding: 0 !important; | |||
} | |||
/* 2. Style each list item as an authoritative card */ | |||
.cram-latest-grid ul li { | |||
background: #ffffff; | |||
border: 1px solid #e1e4e6; | |||
border-top: 4px solid #2c3e50; /* Matches your elite theme accent */ | |||
border-radius: 8px; | |||
padding: 30px 20px; | |||
text-align: center; | |||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02); | |||
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; | |||
/* The Trick: font-size 0 hides raw MediaWiki text nodes like timestamps & byte counts */ | |||
font-size: 0 !important; | |||
visibility: hidden; | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
min-height: 120px; | |||
} | |||
/* 3. Add hover animations to the cards */ | |||
.cram-latest-grid ul li:hover { | |||
transform: translateY(-5px); | |||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08); | |||
border-color: #3498db; | |||
} | |||
/* 4. Resurrect and style ONLY the Article Title link */ | |||
.cram-latest-grid ul li .mw-newpages-pagename { | |||
font-size: 18px !important; | |||
font-weight: bold !important; | |||
color: #2c3e50 !important; | |||
text-decoration: none !important; | |||
visibility: visible !important; | |||
display: block !important; | |||
line-height: 1.4; | |||
} | |||
.cram-latest-grid ul li .mw-newpages-pagename:hover { | |||
color: #3498db !important; | |||
} | |||
/* 5. Hide any other sub-links (like talk pages, history, or user profile tools) */ | |||
.cram-latest-grid ul li a:not(.mw-newpages-pagename) { | |||
display: none !important; | |||
} | } | ||
Revision as of 00:55, 16 May 2026
/* CSS placed here will be applied to all skins */
/* Style the main page InputBox wrapper */
.mw-inputbox-form {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
/* Make the text input field look modern and spacious */
.mw-inputbox-form input[type="text"],
.mw-inputbox-form input[type="search"] {
padding: 12px 20px;
font-size: 16px;
border: 2px solid #ddd;
border-radius: 6px;
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
transition: border-color 0.2s, box-shadow 0.2s;
}
.mw-inputbox-form input[type="text"]:focus {
border-color: #3498db;
box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
outline: none;
}
/* Style the search button to look like a modern CTA */
.mw-inputbox-form input[type="submit"] {
padding: 12px 24px;
font-size: 16px;
background-color: #2c3e50;
color: white;
border: none;
border-radius: 6px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s;
}
.mw-inputbox-form input[type="submit"]:hover {
background-color: #1a252f;
}
/* 1. Turn the standard list into a responsive CSS Grid */
.cram-latest-grid ul {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
list-style: none !important;
margin: 20px 0 !important;
padding: 0 !important;
}
/* 2. Style each list item as an authoritative card */
.cram-latest-grid ul li {
background: #ffffff;
border: 1px solid #e1e4e6;
border-top: 4px solid #2c3e50; /* Matches your elite theme accent */
border-radius: 8px;
padding: 30px 20px;
text-align: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
/* The Trick: font-size 0 hides raw MediaWiki text nodes like timestamps & byte counts */
font-size: 0 !important;
visibility: hidden;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 120px;
}
/* 3. Add hover animations to the cards */
.cram-latest-grid ul li:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
border-color: #3498db;
}
/* 4. Resurrect and style ONLY the Article Title link */
.cram-latest-grid ul li .mw-newpages-pagename {
font-size: 18px !important;
font-weight: bold !important;
color: #2c3e50 !important;
text-decoration: none !important;
visibility: visible !important;
display: block !important;
line-height: 1.4;
}
.cram-latest-grid ul li .mw-newpages-pagename:hover {
color: #3498db !important;
}
/* 5. Hide any other sub-links (like talk pages, history, or user profile tools) */
.cram-latest-grid ul li a:not(.mw-newpages-pagename) {
display: none !important;
}