File size: 3,390 Bytes
e66cfb4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
html {
  scroll-behavior: smooth;     /* 平滑滾動 */
}

/* heading 的捲動預留空間(依你的 header 高度調整,如 80~100px) */
[id^="h-"] {
  scroll-margin-top: 90px;
}
/* 固定 AppShell Header 在頂部,並有底色與層級 */
.mantine-AppShell-header{
  position: sticky;
  top: 0;
  z-index: 2000;
  background: var(--mantine-color-body);
  border-bottom: 1px solid var(--mantine-color-default-border);
}

/* 主內容預留 Header 高度(64px) */
.mantine-AppShell-main{
  padding-top: 64px;
}

/* 圖片安全預設 */
img{ max-width: 100%; height: auto; }

html[data-mantine-color-scheme="light"] .themed-color,
#mantine-provider[data-mantine-color-scheme="light"] .themed-color { 
  --tc: var(--tc-light);
}

html[data-mantine-color-scheme="dark"] .themed-color,
#mantine-provider[data-mantine-color-scheme="dark"]  .themed-color { 
  --tc: var(--tc-dark);
}

/* 讓 --tc 指向 light 或 dark,以 data-mantine-color-scheme 為準 */
[data-mantine-color-scheme="light"] .themed-color { --tc: var(--tc-light); }
[data-mantine-color-scheme="dark"]  .themed-color { --tc: var(--tc-dark); }

/* === Math blocks center (KaTeX + MathJax) === */
.katex-display {
  text-align: center;
  overflow-x: auto;      /* 數學式太長時橫向捲動,不截斷 */
  overflow-y: hidden;
  padding-bottom: 4px;   /* 捲動條不擋到數學式 */
}
mjx-container[display="true"] {
  display: block;
  text-align: center;
  margin: 8px 0;
  overflow-x: auto;      /* MathJax 同樣加橫向捲動 */
}


.math-block { display:block; width:100%; text-align:center; }

.mantine-List-item .math-block {
  width: calc(100% + var(--li-outdent, 0px));
  margin-left: calc(-1 * var(--li-outdent, 0px));
}

/* 主題色切換:背景與前景 */
html[data-mantine-color-scheme="light"] .themed-bg { --bg: var(--bg-light); }
html[data-mantine-color-scheme="dark"]  .themed-bg { --bg: var(--bg-dark);  }
html[data-mantine-color-scheme="light"] .themed-fg { --fg: var(--fg-light); }
html[data-mantine-color-scheme="dark"]  .themed-fg { --fg: var(--fg-dark);  }

/* 讓有這兩個 class 的元素吃到背景/字色 */
.themed-bg { background: var(--bg, var(--bg-light)); }
.themed-fg { color:      var(--fg, var(--fg-light)); }

/* === 讓顏色標記(<!--c_xxx-->)真的套到文字上 === */
.themed-color { color: var(--tc, inherit); }



/* === 卡片用的背景/前景變數(若尚未加入)=== */
html[data-mantine-color-scheme="light"] .themed-bg { --bg: var(--bg-light); }
html[data-mantine-color-scheme="dark"]  .themed-bg { --bg: var(--bg-dark); }
.themed-bg { background: var(--bg, transparent); }

html[data-mantine-color-scheme="light"] .themed-fg { --fg: var(--fg-light); }
html[data-mantine-color-scheme="dark"]  .themed-fg { --fg: var(--fg-dark); }
.themed-fg { color: var(--fg, inherit); }

/* 統一卡片外殼造型 */
.card-shell {
  overflow: visible;              /* 改為 visible,避免截斷長數學式 */
  border-radius: var(--mantine-radius-md);
}

/* 亮色:維持無外框 */
html[data-mantine-color-scheme="light"] .card-shell {
  border: 0;
  box-shadow: none;
}

/* 暗色:加一圈白色外框(半透明) */
html[data-mantine-color-scheme="dark"] .card-shell {
  border: 1px solid rgba(255, 255, 255, 0.28);  /* 想更亮改 0.4、更細可用 0.22 */
  box-shadow: none;                             /* 不要陰影 */
}