MediaWiki:Common.css: различия между версиями
Материал из Набег Wiki
Перейти к навигацииПерейти к поиску
Алисофаг (обсуждение | вклад) Нет описания правки |
Алисофаг (обсуждение | вклад) Нет описания правки |
||
| Строка 11: | Строка 11: | ||
} | } | ||
/* | /* CloudImage thumb — основной контейнер */ | ||
figure.cimg { | figure.cimg { | ||
display: inline-block; | display: inline-block; | ||
clear: both; | clear: both; | ||
margin: 0.6em 0.6em; | margin: 0.6em 0.6em; | ||
border: 1px solid #c8ccd1; | border: 1px solid #c8ccd1; | ||
background-color: #fbfcfd; | background-color: #fbfcfd; | ||
padding: 0.25em; | |||
vertical-align: top; | vertical-align: top; | ||
} | } | ||
/* | /* Убедимся, что картинка растягивается правильно внутри контейнера */ | ||
figure.cimg img { | figure.cimg img { | ||
display: block; | display: block; | ||
| Строка 34: | Строка 30: | ||
/* Подпись */ | /* Подпись */ | ||
figure.cimg figcaption.cimgcaption { | |||
figcaption.cimgcaption | |||
padding: 0.25em 0.35em 0.35em; | padding: 0.25em 0.35em 0.35em; | ||
margin: 0; | |||
font-size: 0.92em; | |||
color: #222; | |||
text-align: left; | text-align: left; | ||
} | } | ||
/* | /* --- Выравнивание: применяем float/центрирование к фигуре (высокая специфичность) --- */ | ||
figure.cimg.tright { | figure.cimg.tright { | ||
float: right; | float: right !important; | ||
margin-left: 1em; | margin-left: 1em !important; | ||
margin-bottom: 0.6em; | margin-bottom: 0.6em !important; | ||
} | } | ||
figure.cimg.tleft { | figure.cimg.tleft { | ||
float: left; | float: left !important; | ||
margin-right: 1em; | margin-right: 1em !important; | ||
margin-bottom: 0.6em; | margin-bottom: 0.6em !important; | ||
} | } | ||
figure.cimg.tcenter { | figure.cimg.tcenter { | ||
display: block; | display: block !important; | ||
margin-left: auto; | margin-left: auto !important; | ||
margin-right: auto; | margin-right: auto !important; | ||
text-align: center; | text-align: center !important; | ||
} | } | ||
/* | /* none */ | ||
figure.cimg.tnone { | figure.cimg.tnone { | ||
float: none; | float: none !important; | ||
display: block; | display: block !important; | ||
margin-left: 0; | margin-left: 0 !important; | ||
margin-right: 0 | margin-right: 0 !important; | ||
} | } | ||
/* --- Небольшой fallback: если по каким-то причинам класс остался на <img> --- */ | |||
figure.cimg img.tcenter { | figure.cimg img.tcenter { | ||
display: block; | display: block; | ||
| Строка 89: | Строка 73: | ||
} | } | ||
figure.cimg img.tright { | figure.cimg img.tright { | ||
float: right; | float: right; | ||
| Строка 102: | Строка 85: | ||
} | } | ||
/* | /* Адаптив: на узком экране делаем thumb блочным и полушироким */ | ||
@media (max-width: 560px) { | @media (max-width: 560px) { | ||
figure.cimg | figure.cimg, figure.cimg.tcenter, figure.cimg.tnone { | ||
display: block !important; | |||
width: auto !important; | |||
max-width: 100% !important; | |||
margin-left: 0.25em !important; | |||
margin-right: 0.25em !important; | |||
} | |||
} | } | ||
Версия от 01:18, 22 сентября 2025
/* Размещённый здесь CSS будет применяться ко всем темам оформления */
.spoiler {
background-color: D3D3D3; /* Or any other color to obscure the text */
color: transparent;
user-select: none; /* Prevents text selection while hidden */
}
.spoiler:hover {
background-color: inherit; /* Reverts to parent background */
color: inherit; /* Reveals the text color */
}
/* CloudImage thumb — основной контейнер */
figure.cimg {
display: inline-block;
clear: both;
margin: 0.6em 0.6em;
border: 1px solid #c8ccd1;
background-color: #fbfcfd;
padding: 0.25em;
vertical-align: top;
}
/* Убедимся, что картинка растягивается правильно внутри контейнера */
figure.cimg img {
display: block;
max-width: 100%;
height: auto;
}
/* Подпись */
figure.cimg figcaption.cimgcaption {
padding: 0.25em 0.35em 0.35em;
margin: 0;
font-size: 0.92em;
color: #222;
text-align: left;
}
/* --- Выравнивание: применяем float/центрирование к фигуре (высокая специфичность) --- */
figure.cimg.tright {
float: right !important;
margin-left: 1em !important;
margin-bottom: 0.6em !important;
}
figure.cimg.tleft {
float: left !important;
margin-right: 1em !important;
margin-bottom: 0.6em !important;
}
figure.cimg.tcenter {
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
text-align: center !important;
}
/* none */
figure.cimg.tnone {
float: none !important;
display: block !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
/* --- Небольшой fallback: если по каким-то причинам класс остался на <img> --- */
figure.cimg img.tcenter {
display: block;
margin-left: auto;
margin-right: auto;
}
figure.cimg img.tright {
float: right;
margin-left: 1em;
margin-bottom: 0.6em;
}
figure.cimg img.tleft {
float: left;
margin-right: 1em;
margin-bottom: 0.6em;
}
/* Адаптив: на узком экране делаем thumb блочным и полушироким */
@media (max-width: 560px) {
figure.cimg, figure.cimg.tcenter, figure.cimg.tnone {
display: block !important;
width: auto !important;
max-width: 100% !important;
margin-left: 0.25em !important;
margin-right: 0.25em !important;
}
}