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

import TemplateStyles CSS
 
Переработка навигационных вкладок отделов: спокойные чипы в стиле вики
 
(не показана 1 промежуточная версия этого же участника)
Строка 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;
 
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 {
 
position: relative;
flex-grow: 1;
overflow: hidden;
align-content: center;
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: #d8dee8;
color: rgba(0,0,0,.55);
border: 1px solid #c9d4e4;
border-color: #9aa8bd;
border-radius: 6px;
border-radius: 6px;
transition-property: background-color, color;
transition-property: background-color, border-color;
transition-duration: 0.15s;
}
}


.department-tab a:hover {
.department-tab a:hover {
background-color: #9aa8bd;
background-color: var(--deptab-25);
border: 1px solid var(--deptab-50);
color: var(--ink);
text-decoration: none;
}
}


.department-tab a:active {
.department-tab a.mw-selflink {
background-color: #d8dee8;
background-color: var(--deptab-25) !important;
border: 1px solid var(--deptab-50) !important;
color: var(--ink) !important;
}
}


.department-tab a:hover,
.department-tab a.mw-selflink:after {
.department-tab a:active {
content: '';
color: #fff;
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: #9aa8bd !important;
.department-tab a {
color: #fff !important;
transition-duration: 0s;
    box-shadow: 0 0 0.33em 1px #9aa8bd;
}
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;
	}
}