Шаблон:DepartmentTabs/styles.css: различия между версиями
Admin (обсуждение | вклад) Цветные вкладки отделов как на SS220 (TemplateStyles-safe) |
Admin (обсуждение | вклад) Переработка навигационных вкладок отделов: спокойные чипы в стиле вики |
||
| Строка 1: | Строка 1: | ||
/* DepartmentTabs — understated chips in the wiki's own panel style. | |||
Department colour comes from the --deptab-* variables set inline by | |||
{{ColorPaletteStyles|Color|deptab}}; it only accents the tab that matters. */ | |||
.department-tabs { | .department-tabs { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: 0.35rem; | |||
overflow: auto; | |||
} | } | ||
.department-tab { | .department-tab { | ||
position: relative; | |||
display: inline-flex; | display: inline-flex; | ||
flex: 1 1 auto; | |||
flex | min-width: 0; | ||
} | } | ||
.department-tab a { | .department-tab a { | ||
flex | position: relative; | ||
align-content: center; | overflow: hidden; | ||
display: flex; | |||
flex: 1 1 auto; | |||
align-items: center; | |||
justify-content: center; | |||
padding: 0.3em 0.9em; | |||
font-size: 0.85rem; | |||
font-weight: bold; | |||
line-height: 1.4; | |||
white-space: nowrap; | |||
text-align: center; | text-align: center; | ||
color: var(--ink); | |||
background-color: var(--panel); | |||
border: 1px solid var(--border); | |||
color: | |||
border: 1px solid var(-- | |||
border-radius: 6px; | border-radius: 6px; | ||
transition-property: background-color, color | transition-property: background-color, border-color; | ||
transition-duration: 0.15s; | transition-duration: 0.15s; | ||
} | } | ||
.department-tab a:hover { | .department-tab a:hover { | ||
background-color: var(--deptab- | background-color: var(--deptab-25); | ||
color: | border: 1px solid var(--deptab-50); | ||
color: var(--ink); | |||
text-decoration: none; | |||
} | |||
.department-tab a.mw-selflink { | |||
background-color: var(--deptab-25) !important; | |||
border: 1px solid var(--deptab-50) !important; | |||
color: var(--ink) !important; | |||
} | } | ||
.department-tab a: | .department-tab a.mw-selflink:after { | ||
background-color: var(--deptab); | content: ''; | ||
position: absolute; | |||
right: 0; | |||
bottom: 0; | |||
left: 0; | |||
height: 3px; | |||
background-color: var(--deptab-75); | |||
} | } | ||
.department-tab a | @media (prefers-reduced-motion: reduce) { | ||
.department-tab a { | |||
transition-duration: 0s; | |||
} | |||
} | } | ||
Текущая версия от 23:43, 21 сентября 2026
/* DepartmentTabs — understated chips in the wiki's own panel style.
Department colour comes from the --deptab-* variables set inline by
{{ColorPaletteStyles|Color|deptab}}; it only accents the tab that matters. */
.department-tabs {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
overflow: auto;
}
.department-tab {
position: relative;
display: inline-flex;
flex: 1 1 auto;
min-width: 0;
}
.department-tab a {
position: relative;
overflow: hidden;
display: flex;
flex: 1 1 auto;
align-items: center;
justify-content: center;
padding: 0.3em 0.9em;
font-size: 0.85rem;
font-weight: bold;
line-height: 1.4;
white-space: nowrap;
text-align: center;
color: var(--ink);
background-color: var(--panel);
border: 1px solid var(--border);
border-radius: 6px;
transition-property: background-color, border-color;
transition-duration: 0.15s;
}
.department-tab a:hover {
background-color: var(--deptab-25);
border: 1px solid var(--deptab-50);
color: var(--ink);
text-decoration: none;
}
.department-tab a.mw-selflink {
background-color: var(--deptab-25) !important;
border: 1px solid var(--deptab-50) !important;
color: var(--ink) !important;
}
.department-tab a.mw-selflink:after {
content: '';
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 3px;
background-color: var(--deptab-75);
}
@media (prefers-reduced-motion: reduce) {
.department-tab a {
transition-duration: 0s;
}
}