مدیاویکی:Common.css: تفاوت میان نسخهها
از ویکییاد
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| خط ۶۶: | خط ۶۶: | ||
background-position: center center !important; | background-position: center center !important; | ||
background-repeat: no-repeat !important; | background-repeat: no-repeat !important; | ||
} | } | ||
نسخهٔ ۲۳ ژانویهٔ ۲۰۲۶، ساعت ۱۹:۲۵
/* Import Vazirmatn from Google Fonts (supports Persian/Arabic very well) */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');
/* Apply Vazirmatn as the main UI font everywhere possible */
body,
#mw-page-base,
#mw-head-base,
#content,
.mw-body,
.mw-body-content,
.vector-menu,
.vector-menu-heading,
.vector-menu-content,
#p-personal ul,
#footer,
.mw-indicators,
.mw-editsection,
.mw-parser-output,
input, button, select, textarea,
.oo-ui-labelElement-label,
.skin-vector,
.skin-vector-search-vue,
.skin-vector-2022 { /* Covers Vector 2022 skin - most common now */
font-family: "Vazirmatn", "Noto Sans Arabic", "DejaVu Sans", Tahoma, Arial, sans-serif !important;
}
/* Headings - make them bolder or adjust if needed */
h1, h2, h3, h4, h5, h6,
.mw-first-heading,
#firstHeading {
font-family: "Vazirmatn", "Noto Kufi Arabic", sans-serif !important;
font-weight: 700; /* Medium-bold for better readability */
}
/* Code / monospace elements - keep a fallback monospace font */
code, pre, .mw-code {
font-family: "Vazirmatn", ui-monospace, monospace !important;
}
/* Optional: Improve line height and spacing for Persian text */
body {
line-height: 1.7;
}
/* Target gallery items from DPL or core gallery */
.gallerybox {
position: relative;
overflow: hidden;
width: 155px !important; /* match your current width */
height: 155px !important; /* force square shape – adjust as needed */
margin: 8px !important;
padding: 0 !important;
border: none !important; /* remove default border */
background-color: #f8f9fa; /* fallback color if image fails */
}
/* Hide the original <img> tag completely */
.gallerybox img {
display: none !important;
}
/* Use the image src as background-cover on the container */
.gallerybox {
background-size: cover !important;
background-position: center center !important;
background-repeat: no-repeat !important;
}
/* Optional: Caption as semi-transparent overlay at bottom */
.gallerytext {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
color: white;
text-align: center;
padding: 6px 4px;
margin: 0 !important;
font-size: 0.9em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Optional: Hover zoom effect */
.gallerybox:hover {
transform: scale(1.05);
transition: transform 0.2s ease;
}
