Шаблон:ТаблицаРолей/Тест/styles.css: различия между версиями
Материал из FIRE STATION WIKI
Дополнительные действия
Нет описания правки |
Нет описания правки |
||
| Строка 50: | Строка 50: | ||
} | } | ||
/* ИСПРАВЛЕНО: | /* ИСПРАВЛЕНО: Жёсткая сетка Grid на 5 колонок с автоподстройкой */ | ||
.RoleTable-content_main { | .RoleTable-content_main { | ||
padding: | padding: 8px; | ||
display: | display: grid; | ||
grid-template-columns: repeat(5, 1fr); | |||
gap: 8px; | gap: 8px; | ||
border-radius: 3px; | border-radius: 3px; | ||
width: 100%; | width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
/* ИСПРАВЛЕНО: | /* ИСПРАВЛЕНО: Убираем влияние внутренней ширины карточек */ | ||
.cardRole { | .cardRole { | ||
width: 100% !important; | |||
max-width: | max-width: 100% !important; | ||
min-width: 0 !important; | |||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
| Строка 104: | Строка 104: | ||
} | } | ||
/* Адаптация | /* Адаптация под разные экраны (чтобы на планшетах и телефонах не ломалось) */ | ||
@media (max-width: 1024px) { | |||
.RoleTable-content_main { | |||
grid-template-columns: repeat(3, 1fr); /* На планшетах будет по 3 в ряд */ | |||
} | |||
} | |||
@media (max-width: 640px) { | @media (max-width: 640px) { | ||
.RoleTable-content_main { | |||
grid-template-columns: repeat(2, 1fr); /* На маленьких экранах по 2 в ряд */ | |||
} | |||
.RoleTable-content_secondary { | .RoleTable-content_secondary { | ||
grid-template-columns: 1fr; | grid-template-columns: 1fr; | ||
Версия от 18:16, 22 июня 2026
/* Основные стили карточки */
.RoleTable-card {
display: inline-flex;
flex-direction: column;
max-width: 100%;
min-width: 300px;
width: 100%;
margin: 0.5em 0 5px 0;
padding: 2px;
border-radius: 6px;
box-sizing: border-box;
}
/* Заголовок карточки */
.RoleTable-card_header {
border-radius: 3px;
text-align: center;
cursor: pointer;
}
.RoleTable-card_header_title {
display: flex;
justify-content: space-between;
align-items: center;
text-align: left;
margin: 0 6px;
padding: 3px 0;
}
.RoleTable-header_icon {
flex: 0 0 32px;
}
.RoleTable-card_title {
margin: 6px 0;
color: white;
font-size: 16px;
text-align: center;
flex-grow: 1;
}
.RoleTable-card_title a {
color: white !important;
}
/* Основное содержимое */
.RoleTable-card_content {
margin-top: 3px;
width: 100%;
}
/* ИСПРАВЛЕНО: Жёсткая сетка Grid на 5 колонок с автоподстройкой */
.RoleTable-content_main {
padding: 8px;
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
border-radius: 3px;
width: 100%;
box-sizing: border-box;
}
/* ИСПРАВЛЕНО: Убираем влияние внутренней ширины карточек */
.cardRole {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
box-sizing: border-box;
}
/* Вторичное содержимое */
.RoleTable-content_secondary {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 3px;
margin-top: 3px;
width: 100%;
box-sizing: border-box;
}
.RoleTable-content_secondary > .RoleTable-content_block:only-child {
grid-column: 1 / -1;
}
.RoleTable-content_block {
border-radius: 3px;
padding: 0 5px;
min-width: 0;
}
.RoleTable-block_title {
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.RoleTable-block_content {
padding: 2px 0;
}
.RoleTable-block_content p {
margin: 0;
}
/* Адаптация под разные экраны (чтобы на планшетах и телефонах не ломалось) */
@media (max-width: 1024px) {
.RoleTable-content_main {
grid-template-columns: repeat(3, 1fr); /* На планшетах будет по 3 в ряд */
}
}
@media (max-width: 640px) {
.RoleTable-content_main {
grid-template-columns: repeat(2, 1fr); /* На маленьких экранах по 2 в ряд */
}
.RoleTable-content_secondary {
grid-template-columns: 1fr;
}
.RoleTable-content_block {
min-width: 100%;
}
.RoleTable-content_secondary > .RoleTable-content_block:only-child {
grid-column: 1;
}
}