Шаблон:DepartmentTabs/styles.css: различия между версиями

Цветные вкладки отделов как на SS220 (TemplateStyles-safe)
Переработка навигационных вкладок отделов: спокойные чипы в стиле вики
 
Строка 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 {
overflow: auto;
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
flex-grow: 1;
gap: 0.35rem;
gap: 0.25rem;
overflow: auto;
}
}


.department-tab {
.department-tab {
position: relative;
display: inline-flex;
display: inline-flex;
position: relative;
flex: 1 1 auto;
flex-grow: 1;
min-width: 0;
flex-basis: 5%;
}
}


.department-tab a {
.department-tab a {
flex-grow: 1;
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;
font-weight: bold;
color: var(--ink);
height: 1.5em;
background-color: var(--panel);
padding: 0.25em 1em;
border: 1px solid var(--border);
background-color: var(--deptab);
color: rgba(255, 255, 255, 0.92);
border: 1px solid var(--deptab-hover);
border-radius: 6px;
border-radius: 6px;
transition-property: background-color, color, box-shadow;
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-hover);
background-color: var(--deptab-25);
color: #ffffff;
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:active {
.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.mw-selflink {
@media (prefers-reduced-motion: reduce) {
background-color: var(--deptab-hover) !important;
.department-tab a {
color: #ffffff !important;
transition-duration: 0s;
box-shadow: 0 0 0.33em 1px var(--deptab-hover);
}
z-index: 2;
}
}

Текущая версия от 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;
	}
}