ميدياويكي:Common.css
المظهر
ملاحظة: بعد النشر، أنت قد تحتاج إلى إفراغ الكاش الخاص بمتصفحك لرؤية التغييرات.
- فايرفوكس / سافاري: أمسك Shift أثناء ضغط Reload، أو اضغط على إما Ctrl-F5 أو Ctrl-R (⌘-R على ماك)
- جوجل كروم: اضغط Ctrl-Shift-R (⌘-Shift-R على ماك)
- إنترنت إكسبلورر/إيدج: أمسك Ctrl أثناء ضغط Refresh، أو اضغط Ctrl-F5
- أوبرا: اضغط Ctrl-F5.
/* ========================
Academic Theme Variables
========================= */
:root {
--primary-dark: #1a237e;
--secondary-dark: #283593;
--tertiary-dark: #3949ab;
--accent-dark: #2c3e50;
--text-primary: #212121;
--text-secondary: #424242;
--text-muted: #757575;
--white: #ffffff;
--off-white: #fafafa;
--border-light: #e0e0e0;
--shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.12);
--shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.15);
--shadow-deep: 0 8px 32px rgba(0, 0, 0, 0.18);
--transition-smooth: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
--border-radius: 8px;
--border-radius-lg: 12px;
}
/* ========================
Typography Imports
========================= */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');
/* ========================
Base Styling
========================= */
body {
font-family: 'Crimson Text', serif;
background-color: var(--white);
color: var(--text-primary);
margin: 0;
padding: 0;
line-height: 1.6;
font-size: 16px;
}
/* ========================
Header Styling
========================= */
.mw-body-header {
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
color: var(--white);
padding: 24px 32px;
text-align: center;
font-family: 'Inter', sans-serif;
font-size: 28px;
font-weight: 600;
letter-spacing: -0.5px;
box-shadow: var(--shadow-elevated);
position: relative;
border-bottom: 1px solid var(--border-light);
margin-bottom: 32px;
}
.mw-body-header::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg,
var(--tertiary-dark) 0%,
var(--primary-dark) 50%,
var(--tertiary-dark) 100%);
}
.mw-body-header::after {
content: "";
position: absolute;
bottom: -1px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 3px;
background: var(--tertiary-dark);
border-radius: 2px;
}
/* ========================
Dropdown Menu
========================= */
.vector-dropdown {
position: relative;
display: inline-block;
cursor: pointer;
font-family: 'Inter', sans-serif;
}
.vector-dropdown-content {
display: none;
position: absolute;
top: 100%;
left: 0;
background-color: var(--white);
min-width: 200px;
box-shadow: var(--shadow-deep);
border: 1px solid var(--border-light);
border-radius: var(--border-radius);
z-index: 1000;
margin-top: 8px;
padding: 8px 0;
}
.vector-dropdown:hover .vector-dropdown-content {
display: block;
animation: fadeInDropdown 0.2s ease-out;
}
@keyframes fadeInDropdown {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.vector-dropdown-content a {
display: block;
padding: 12px 20px;
color: var(--text-primary);
text-decoration: none;
font-size: 14px;
font-weight: 400;
transition: background-color var(--transition-smooth);
border-bottom: 1px solid var(--off-white);
}
.vector-dropdown-content a:last-child {
border-bottom: none;
}
.vector-dropdown-content a:hover {
background-color: var(--off-white);
color: var(--primary-dark);
}
/* ========================
Content Styling
========================= */
#content {
background: var(--white);
border: 1px solid var(--border-light);
padding: 40px;
margin: 0 auto;
max-width: 900px;
border-radius: var(--border-radius-lg);
font-family: 'Crimson Text', serif;
font-size: 18px;
line-height: 1.8;
color: var(--text-primary);
box-shadow: var(--shadow-subtle);
position: relative;
margin-bottom: 32px;
}
#content::before {
content: "";
position: absolute;
top: 0;
left: 24px;
right: 24px;
height: 2px;
background: linear-gradient(90deg,
transparent 0%,
var(--primary-dark) 50%,
transparent 100%);
border-radius: 1px;
}
/* Content Typography */
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
font-family: 'Inter', sans-serif;
color: var(--primary-dark);
font-weight: 600;
margin-top: 2em;
margin-bottom: 1em;
line-height: 1.3;
}
#content h1 {
font-size: 2.5em;
border-bottom: 3px solid var(--primary-dark);
padding-bottom: 0.5em;
}
#content h2 {
font-size: 2em;
border-bottom: 2px solid var(--secondary-dark);
padding-bottom: 0.3em;
}
#content h3 {
font-size: 1.5em;
color: var(--secondary-dark);
}
#content p {
margin-bottom: 1.5em;
text-align: justify;
}
#content a {
color: var(--primary-dark);
text-decoration: none;
border-bottom: 1px solid var(--tertiary-dark);
transition: all var(--transition-smooth);
font-weight: 500;
}
#content a:hover {
color: var(--secondary-dark);
border-bottom-color: var(--secondary-dark);
background-color: rgba(26, 35, 126, 0.05);
padding: 2px 4px;
border-radius: 3px;
}
/* ========================
Categories Styling
========================= */
#catlinks {
background: var(--white);
border: 1px solid var(--border-light);
padding: 24px;
margin: 32px auto 0;
max-width: 900px;
border-radius: var(--border-radius-lg);
font-family: 'Inter', sans-serif;
font-size: 16px;
box-shadow: var(--shadow-subtle);
position: relative;
}
#catlinks::before {
content: "Categories";
display: block;
font-weight: 600;
color: var(--primary-dark);
margin-bottom: 16px;
font-size: 18px;
padding-bottom: 8px;
border-bottom: 2px solid var(--off-white);
}
#catlinks a {
color: var(--text-secondary);
font-weight: 500;
text-decoration: none;
padding: 8px 16px;
margin: 4px 8px 4px 0;
background-color: var(--off-white);
border: 1px solid var(--border-light);
border-radius: 20px;
display: inline-block;
transition: all var(--transition-smooth);
font-size: 14px;
position: relative;
overflow: hidden;
}
#catlinks a::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(26, 35, 126, 0.1), transparent);
transition: left 0.5s ease;
}
#catlinks a:hover::before {
left: 100%;
}
#catlinks a:hover {
background-color: var(--primary-dark);
color: var(--white);
border-color: var(--primary-dark);
transform: translateY(-2px);
box-shadow: var(--shadow-elevated);
}
/* ========================
Responsive Design
========================= */
@media (max-width: 768px) {
.mw-body-header {
padding: 20px 16px;
font-size: 24px;
}
#content, #catlinks {
margin: 0 16px;
padding: 24px;
}
#content {
margin-bottom: 24px;
}
#catlinks {
margin-top: 24px;
}
}
@media (max-width: 480px) {
.mw-body-header {
font-size: 20px;
padding: 16px 12px;
}
#content, #catlinks {
margin: 0 8px;
padding: 16px;
}
#catlinks a {
margin: 2px 4px 2px 0;
padding: 6px 12px;
font-size: 13px;
}
}
/* ========================
Accessibility & Performance
========================= */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
}
}
@media print {
body {
background-color: white;
}
.mw-body-header {
background: white !important;
color: black !important;
box-shadow: none;
border-bottom: 2px solid black;
}
#content, #catlinks {
box-shadow: none;
border: 1px solid black;
}
#catlinks a {
background-color: white !important;
color: black !important;
border: 1px solid black;
}
}
/* ========================
Focus States for Accessibility
========================= */
a:focus, .vector-dropdown:focus {
outline: 2px solid var(--primary-dark);
outline-offset: 2px;
border-radius: var(--border-radius);
}
/* ========================
Utility Classes
========================= */
.printfooter,
.vector-menu h3 {
display: none;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}