跳转到内容

Module:沙盒/a2569875/PythonScript/ExtraLibrarys/Matplotlib/Style.css

维基百科,自由的百科全书
/* Module:PythonScript/ExtraLibrarys/Matplotlib/Style.css */

/* 混合渲染外層定位容器:固定與底層 SVG 1:1 像素鎖定,防止容器縮水導致文字跑版 */
.mpl-hybrid {
	position: relative;
	display: inline-block;
	max-width: none;
	line-height: 1;
	vertical-align: middle;
	margin: 0;
	padding: 0;
}

/* 底層 SVG 影像基礎樣式 */
img.mpl-svg,
img.function-graph-svg,
img.complex-graph-svg {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* HTML 繁簡轉換文字疊加層共用基礎類別 */
.mpl-ov {
	position: absolute;
	white-space: nowrap;
	font-family: sans-serif;
	color: #2b2b2b;
	line-height: 1.15;
}

/* 幾何中心對齊錨點 (用於圖表標題、子圖標題與 X 軸標籤) */
.mpl-c {
	transform: translate(-50%, -50%);
}

/* 垂直置中錨點 (用於圖例標題、圖例項目與右側文字) */
.mpl-v {
	transform: translateY(-50%);
}

/* 右側對齊垂直置中錨點 */
.mpl-r {
	transform: translate(-100%, -50%);
}

/* 逆時針旋轉 90 度錨點 (用於 Y 軸與虛軸標籤) */
.mpl-rot-y {
	transform: translate(-50%, -50%) rotate(-90deg);
	transform-origin: center center;
}

/* 字級與粗細修飾類別 */
.mpl-ttl {
	font-size: 15px;
	font-weight: bold;
}

.mpl-sttl {
	font-size: 13px;
	font-weight: bold;
}

.mpl-lhdr {
	font-size: 11px;
	font-weight: bold;
}

.mpl-fs9 {
	font-size: 9.5px;
}

.mpl-fs10 {
	font-size: 10px;
}

.mpl-fs11 {
	font-size: 11px;
}

.mpl-fs12 {
	font-size: 12px;
}

.mpl-fs14 {
	font-size: 14px;
}

/* 動態滾動視窗模式 (預設暫停,滑鼠移入 :hover 或設定 auto 時播放) */
.mpl-anim-viewport {
	position: relative;
	display: inline-block;
	overflow: hidden;
	vertical-align: middle;
}

.mpl-anim-track {
	display: inline-block;
	/*will-change: transform;*/
	animation: mpl-wave-scroll 6s linear infinite;
	animation-play-state: paused;
}

.mpl-anim-viewport:hover .mpl-anim-track,
.mpl-anim-auto .mpl-anim-track {
	animation-play-state: running;
}

@keyframes mpl-wave-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* 互動式 Hover 感應區基礎類別 */
.mpl-ht {
	position: absolute;
	box-sizing: border-box;
	cursor: pointer;
	/*pointer-events: auto;*/
	z-index: 5;
	transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

/* 矩形高亮框 (用於長條圖、直方圖、甘特圖、箱形圖、小提琴圖) */
.mpl-hb {
	border: 1.5px solid transparent;
	border-radius: 3px;
}

.mpl-hb:hover {
	border-color: rgba(55, 55, 55, 0.85);
	background-color: rgba(255, 255, 255, 0.22);
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
	z-index: 25;
}

/* 圓形高亮光圈 (用於折線圖點、階梯圖、誤差條、散佈氣泡圖、圓餅圖) */
.mpl-hp {
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 2px solid transparent;
}

.mpl-hp:hover {
	border-color: rgba(65, 130, 185, 0.88);
	background-color: rgba(110, 165, 215, 0.28);
	box-shadow: 0 0 4px rgba(65, 130, 185, 0.35);
	z-index: 25;
}

/* 浮動 Tooltip 卡片 */
.mpl-tt {
	display: none;
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	background: #ffffff;
	color: #222222;
	border: 1px solid #b0b8c0;
	border-radius: 5px;
	padding: 4px 8px;
	font-family: sans-serif;
	font-size: 11.5px;
	font-weight: normal;
	line-height: 1.35;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	/*pointer-events: none;*/
	z-index: 35;
}

.mpl-ht:hover .mpl-tt {
	display: inline-block;
}

/* 當目標靠近頂部邊界時,自動改為向下方彈出 Tooltip 防削頭 */
.mpl-tt-b {
	bottom: auto;
	top: calc(100% + 6px);
}

/* Tooltip 內的前置彩色圓點 */
.mpl-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 5px;
	vertical-align: middle;
}