MediaWiki:Common.css: различия между версиями
Материал из OPSNARK - энциклопедия преступностей
Перейти к навигацииПерейти к поиску
Perelman (обсуждение | вклад) (Новая страница: «→Размещённый здесь CSS будет применяться ко всем темам оформления: →Адаптивный дизайн для мобильных устройств: @media (max-width: 768px) { .infobox-ops { width: 100% !important; float: none !important; margin: 0 0 1em 0 !important; } .article-content { width: 100% !important; float: none !important; } .gallery-container .galle...») |
Perelman (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
/* | /* Адаптивный дизайн для ОПС шаблона */ | ||
/* | .ops-container { | ||
width: 100%; | |||
} | |||
/* Мобильная версия инфобокса */ | |||
.infobox-ops-mobile { | |||
display: none; | |||
width: 100%; | |||
font-size: 90%; | |||
border: 1px solid #aaa; | |||
background-color: #f9f9f9; | |||
border-radius: 6px; | |||
overflow: hidden; | |||
margin-bottom: 1em; | |||
} | |||
/* Десктопная версия */ | |||
.ops-desktop-layout { | |||
display: flex; | |||
} | |||
/* Мобильные стили */ | |||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.infobox-ops { | .infobox-ops-mobile { | ||
width: 100% | display: block; | ||
} | |||
.ops-desktop-layout { | |||
display: none; | |||
} | |||
.infobox-ops-mobile table { | |||
width: 100%; | |||
border-collapse: collapse; | |||
} | |||
.infobox-ops-mobile th, | |||
.infobox-ops-mobile td { | |||
padding: 8px; | |||
border-bottom: 1px solid #ddd; | |||
} | |||
.infobox-ops-mobile th { | |||
text-align: left; | |||
background-color: #f0f0f0; | |||
width: 40%; | |||
} | |||
} | |||
/* Десктопные стили */ | |||
@media (min-width: 769px) { | |||
.infobox-ops-mobile { | |||
display: none; | |||
} | } | ||
.ops-desktop-layout { | |||
display: flex; | |||
} | |||
} | |||
/* Дополнительные улучшения для мобильных */ | |||
@media (max-width: 768px) { | |||
.article-content { | .article-content { | ||
width: 100% !important; | width: 100% !important; | ||
| Строка 22: | Строка 76: | ||
width: 100% !important; | width: 100% !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
text-align: center; | |||
} | } | ||
| Строка 27: | Строка 82: | ||
max-width: 100% !important; | max-width: 100% !important; | ||
height: auto !important; | height: auto !important; | ||
border-radius: 4px; | |||
} | |||
.gallery-container .gallerytext { | |||
font-size: 12px; | |||
padding: 5px; | |||
} | } | ||
} | } | ||
/* Базовые стили для | /* Базовые стили для читаемости */ | ||
.article-content { | .article-content { | ||
line-height: 1.6; | line-height: 1.6; | ||
Версия от 16:31, 14 октября 2025
/* Адаптивный дизайн для ОПС шаблона */
.ops-container {
width: 100%;
}
/* Мобильная версия инфобокса */
.infobox-ops-mobile {
display: none;
width: 100%;
font-size: 90%;
border: 1px solid #aaa;
background-color: #f9f9f9;
border-radius: 6px;
overflow: hidden;
margin-bottom: 1em;
}
/* Десктопная версия */
.ops-desktop-layout {
display: flex;
}
/* Мобильные стили */
@media (max-width: 768px) {
.infobox-ops-mobile {
display: block;
}
.ops-desktop-layout {
display: none;
}
.infobox-ops-mobile table {
width: 100%;
border-collapse: collapse;
}
.infobox-ops-mobile th,
.infobox-ops-mobile td {
padding: 8px;
border-bottom: 1px solid #ddd;
}
.infobox-ops-mobile th {
text-align: left;
background-color: #f0f0f0;
width: 40%;
}
}
/* Десктопные стили */
@media (min-width: 769px) {
.infobox-ops-mobile {
display: none;
}
.ops-desktop-layout {
display: flex;
}
}
/* Дополнительные улучшения для мобильных */
@media (max-width: 768px) {
.article-content {
width: 100% !important;
float: none !important;
}
.gallery-container .gallery {
display: grid !important;
grid-template-columns: repeat(2, 1fr) !important;
gap: 10px !important;
}
.gallery-container .gallerybox {
width: 100% !important;
margin: 0 !important;
text-align: center;
}
.gallery-container .gallerybox img {
max-width: 100% !important;
height: auto !important;
border-radius: 4px;
}
.gallery-container .gallerytext {
font-size: 12px;
padding: 5px;
}
}
/* Базовые стили для читаемости */
.article-content {
line-height: 1.6;
text-align: justify;
}
.article-content h2 {
border-bottom: 2px solid #B0C4DE;
padding-bottom: 5px;
margin-top: 1.5em;
}
.article-content ul {
padding-left: 1.5em;
}
.gallery-container {
margin-top: 2em;
clear: both;
}