MediaWiki:Gadget-toc-progress.css

Версия от 12:37, 12 ноября 2026; Ланселот (обсуждение | вклад) (Новая страница: «→Gadget: toc-progress: .gadget-toc { position: fixed; right: 16px; bottom: 24px; z-index: 1000; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #202122; } .gadget-toc__btn { position: relative; width: 56px; height: 56px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; tran...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Замечание: Возможно, после публикации вам придётся очистить кэш своего браузера, чтобы увидеть изменения.

  • Firefox / Safari: Удерживая клавишу Shift, нажмите на панели инструментов Обновить либо нажмите Ctrl+F5 или Ctrl+R (⌘+R на Mac)
  • Google Chrome: Нажмите Ctrl+Shift+R (⌘+Shift+R на Mac)
  • Edge: Удерживая Ctrl, нажмите Обновить либо нажмите Ctrl+F5
  • Opera: Нажмите Ctrl+F5.
/* Gadget: toc-progress */
.gadget-toc {
	position: fixed;
	right: 16px;
	bottom: 24px;
	z-index: 1000;
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #202122;
}
.gadget-toc__btn {
	position: relative;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	cursor: pointer;
	display: grid;
	place-items: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.gadget-toc.is-visible .gadget-toc__btn {
	opacity: 1;
	pointer-events: auto;
}
.gadget-toc__btn:hover {
	transform: scale(1.05);
}
.gadget-toc__ring {
	position: absolute;
	inset: 0;
	transform: rotate(-90deg);
}
.gadget-toc__ring-bg {
	fill: none;
	stroke: #e6e6e6;
	stroke-width: 3;
}
.gadget-toc__ring-fg {
	fill: none;
	stroke: #36c;
	stroke-width: 3;
	stroke-linecap: round;
	transition: stroke-dashoffset .15s linear;
}
.gadget-toc__pct {
	font-size: 11px;
	font-weight: 600;
	color: #36c;
}

.gadget-toc__panel {
	position: absolute;
	right: 0;
	bottom: 68px;
	width: 280px;
	max-height: 60vh;
	overflow: auto;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
	padding: 8px;
}
.gadget-toc__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	padding: 4px 8px 8px;
	border-bottom: 1px solid #eee;
}
.gadget-toc__close {
	border: none;
	background: none;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
}
.gadget-toc__list {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
}
.gadget-toc__item a {
	display: block;
	padding: 6px 10px;
	border-radius: 6px;
	color: #202122;
	text-decoration: none;
	border-left: 3px solid transparent;
}
.gadget-toc__item--sub a {
	padding-left: 24px;
	font-size: 13px;
}
.gadget-toc__item a:hover {
	background: #f2f5fa;
}
.gadget-toc__item a.is-active {
	background: #eaf3ff;
	border-left-color: #36c;
	font-weight: 600;
}
.gadget-toc__item a.is-done {
	color: #72777d;
}

/* Отступ под фиксированную шапку */
#mw-content-text h2,
#mw-content-text h3 {
	scroll-margin-top: 72px;
}

@media ( max-width: 719px ) {
	.gadget-toc__panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-height: 70vh;
		border-radius: 14px 14px 0 0;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.gadget-toc__btn,
	.gadget-toc__ring-fg,
	.gadget-toc__item a {
		transition: none;
	}
}

@media print {
	.gadget-toc {
		display: none;
	}
}