Spaces:
Running
Running
基礎內文字級一律走 --font-size-base(14px),不再硬寫 rem
Browse files千卉指正:全站基礎文字的規範是 14px(0.875rem)且要走 --font-size-base 共用
變數(2026-07-20 決策),但上一個 commit 我硬寫成 .88rem(14.08px),既不是
14px 也繞過了變數。
改回走變數的位置:
- 導覽列三處(#result_nav_col .result-nav-btn / --muted / #reset_btn)
- 分析面板結論行 .analysis-row-body(.84rem)
- 首頁情境卡說明 .sc-desc(.85rem)、讀取進度連結 .placeholder-link(.88rem)
- 主要操作按鈕(.92rem)
- textarea/input 全域(0.875rem 雖然數值相同但硬寫,改成變數才是單一來源)
- 空狀態說明文字(_EMPTY_HINT 內聯 0.82rem)
實測所有基礎內文皆為 14px:導覽列四項、對話氣泡、輸入框、確認上傳按鈕、
情境卡說明、讀取進度連結。
保留硬寫的都是刻意的層級差異、非基礎內文:標題(1.02–2.1rem)、步驟列 pill
(0.62–0.72rem)、小徽章(0.78rem)、程式碼與表格輔助字(0.70–0.75rem)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- app_agent.py +9 -9
app_agent.py
CHANGED
|
@@ -1798,7 +1798,7 @@ _EMPTY_HINT = (
|
|
| 1798 |
'd="M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"/>'
|
| 1799 |
'</svg></div>'
|
| 1800 |
'<p style="font-size:1rem;font-weight:600;color:var(--c-text-muted);margin:0 0 .4rem;">尚未產生資料</p>'
|
| 1801 |
-
'<p style="font-size:
|
| 1802 |
'</div>'
|
| 1803 |
)
|
| 1804 |
|
|
@@ -2659,7 +2659,7 @@ div[role="log"][aria-label="chatbot conversation"],
|
|
| 2659 |
padding: .85rem 1.1rem !important;
|
| 2660 |
border-radius: 10px !important;
|
| 2661 |
font-weight: 600 !important;
|
| 2662 |
-
font-size:
|
| 2663 |
}
|
| 2664 |
/* ── 5d. HOMEPAGE(Phase 8:首頁 4 張情境卡片)──────────────────── */
|
| 2665 |
/* 隱藏版情境按鈕:純作 JS 橋接目標(見 _APP_HEAD_SCRIPT),
|
|
@@ -2754,11 +2754,11 @@ div[role="log"][aria-label="chatbot conversation"],
|
|
| 2754 |
.scenario-card:hover .sc-index, .scenario-card:focus-visible .sc-index { color: var(--c-accent); }
|
| 2755 |
.scenario-card .sc-body { min-width: 0; display: flex; flex-direction: column; }
|
| 2756 |
.scenario-card .sc-title { margin: 0 0 .35rem; font-size: 1.02rem; font-weight: 700; color: var(--c-text); line-height: 1.4; }
|
| 2757 |
-
.scenario-card .sc-desc { margin: 0; font-size:
|
| 2758 |
.homepage-secondary { display: flex; justify-content: center; margin-top: 2rem; }
|
| 2759 |
.homepage-secondary .placeholder-link {
|
| 2760 |
display: inline-flex; align-items: center; gap: .4rem;
|
| 2761 |
-
font-size:
|
| 2762 |
}
|
| 2763 |
.homepage-secondary .placeholder-link svg { width: 1rem; height: 1rem; opacity: .6; }
|
| 2764 |
.homepage-footnote { margin-top: 2rem; text-align: center; font-size: .82rem; color: var(--c-text-subtle); }
|
|
@@ -3065,7 +3065,7 @@ img.button-icon { opacity: .82; }
|
|
| 3065 |
.reset-btn { margin-top: .8rem !important; width: 100% !important; }
|
| 3066 |
/* 用 id 選擇器才蓋得過 Gradio 的 button.svelte-xxx.secondary(type+class 組合
|
| 3067 |
specificity 比純 class 高,本檔多處踩過同一個坑),字級才會真的變成 .88rem */
|
| 3068 |
-
#reset_btn { font-size:
|
| 3069 |
/* 2026-07-24:確認框從 nav-col 內嵌卡片改成置中 modal。
|
| 3070 |
刻意不對 overlay 設 display——Gradio 的 visible=False 就是靠 display:none
|
| 3071 |
生效,這裡若寫 display:flex !important 會把「隱藏」本身蓋掉,對話框變成
|
|
@@ -3145,7 +3145,7 @@ img.button-icon { opacity: .82; }
|
|
| 3145 |
不貼齊欄邊。拿掉原本 Bootstrap nav-underline 的左緣線(千卉指定改填色)。 */
|
| 3146 |
#result_nav_col .result-nav-btn {
|
| 3147 |
padding: .5rem .7rem !important;
|
| 3148 |
-
font-size:
|
| 3149 |
font-weight: 500 !important;
|
| 3150 |
border-radius: 8px !important;
|
| 3151 |
color: var(--c-text-soft) !important;
|
|
@@ -3192,7 +3192,7 @@ img.button-icon { opacity: .82; }
|
|
| 3192 |
技術執行紀錄原本 .82rem 比其他項目小一階,改回 .88rem;它的「低優先度」
|
| 3193 |
仍靠顏色(--c-text-muted)與上方分隔線表達,不再靠縮小字級。 */
|
| 3194 |
#result_nav_col .result-nav-btn--muted {
|
| 3195 |
-
font-size:
|
| 3196 |
font-weight: 500 !important;
|
| 3197 |
color: var(--c-text-muted) !important;
|
| 3198 |
}
|
|
@@ -3249,7 +3249,7 @@ img.button-icon { opacity: .82; }
|
|
| 3249 |
}
|
| 3250 |
.analysis-row-body {
|
| 3251 |
padding-left: 1.65rem; /* 對齊圖示右側,讓結論文字跟標題文字左緣一致 */
|
| 3252 |
-
font-size:
|
| 3253 |
color: var(--c-text-soft);
|
| 3254 |
display: flex;
|
| 3255 |
flex-wrap: wrap;
|
|
@@ -3387,7 +3387,7 @@ textarea, input[type="text"] {
|
|
| 3387 |
border: 1px solid var(--c-input-border) !important;
|
| 3388 |
border-radius: 9px !important;
|
| 3389 |
color: var(--c-text) !important;
|
| 3390 |
-
font-size:
|
| 3391 |
line-height: 1.6 !important;
|
| 3392 |
transition: border-color .18s ease, box-shadow .18s ease !important;
|
| 3393 |
}
|
|
|
|
| 1798 |
'd="M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z"/>'
|
| 1799 |
'</svg></div>'
|
| 1800 |
'<p style="font-size:1rem;font-weight:600;color:var(--c-text-muted);margin:0 0 .4rem;">尚未產生資料</p>'
|
| 1801 |
+
'<p style="font-size:var(--font-size-base);color:var(--c-text-subtle);margin:0;">請先於「主頁」完成分析流程</p>'
|
| 1802 |
'</div>'
|
| 1803 |
)
|
| 1804 |
|
|
|
|
| 2659 |
padding: .85rem 1.1rem !important;
|
| 2660 |
border-radius: 10px !important;
|
| 2661 |
font-weight: 600 !important;
|
| 2662 |
+
font-size: var(--font-size-base) !important;
|
| 2663 |
}
|
| 2664 |
/* ── 5d. HOMEPAGE(Phase 8:首頁 4 張情境卡片)──────────────────── */
|
| 2665 |
/* 隱藏版情境按鈕:純作 JS 橋接目標(見 _APP_HEAD_SCRIPT),
|
|
|
|
| 2754 |
.scenario-card:hover .sc-index, .scenario-card:focus-visible .sc-index { color: var(--c-accent); }
|
| 2755 |
.scenario-card .sc-body { min-width: 0; display: flex; flex-direction: column; }
|
| 2756 |
.scenario-card .sc-title { margin: 0 0 .35rem; font-size: 1.02rem; font-weight: 700; color: var(--c-text); line-height: 1.4; }
|
| 2757 |
+
.scenario-card .sc-desc { margin: 0; font-size: var(--font-size-base); color: var(--c-text-muted); line-height: 1.65; }
|
| 2758 |
.homepage-secondary { display: flex; justify-content: center; margin-top: 2rem; }
|
| 2759 |
.homepage-secondary .placeholder-link {
|
| 2760 |
display: inline-flex; align-items: center; gap: .4rem;
|
| 2761 |
+
font-size: var(--font-size-base); color: var(--c-text-subtle); cursor: not-allowed;
|
| 2762 |
}
|
| 2763 |
.homepage-secondary .placeholder-link svg { width: 1rem; height: 1rem; opacity: .6; }
|
| 2764 |
.homepage-footnote { margin-top: 2rem; text-align: center; font-size: .82rem; color: var(--c-text-subtle); }
|
|
|
|
| 3065 |
.reset-btn { margin-top: .8rem !important; width: 100% !important; }
|
| 3066 |
/* 用 id 選擇器才蓋得過 Gradio 的 button.svelte-xxx.secondary(type+class 組合
|
| 3067 |
specificity 比純 class 高,本檔多處踩過同一個坑),字級才會真的變成 .88rem */
|
| 3068 |
+
#reset_btn { font-size: var(--font-size-base) !important; }
|
| 3069 |
/* 2026-07-24:確認框從 nav-col 內嵌卡片改成置中 modal。
|
| 3070 |
刻意不對 overlay 設 display——Gradio 的 visible=False 就是靠 display:none
|
| 3071 |
生效,這裡若寫 display:flex !important 會把「隱藏」本身蓋掉,對話框變成
|
|
|
|
| 3145 |
不貼齊欄邊。拿掉原本 Bootstrap nav-underline 的左緣線(千卉指定改填色)。 */
|
| 3146 |
#result_nav_col .result-nav-btn {
|
| 3147 |
padding: .5rem .7rem !important;
|
| 3148 |
+
font-size: var(--font-size-base) !important;
|
| 3149 |
font-weight: 500 !important;
|
| 3150 |
border-radius: 8px !important;
|
| 3151 |
color: var(--c-text-soft) !important;
|
|
|
|
| 3192 |
技術執行紀錄原本 .82rem 比其他項目小一階,改回 .88rem;它的「低優先度」
|
| 3193 |
仍靠顏色(--c-text-muted)與上方分隔線表達,不再靠縮小字級。 */
|
| 3194 |
#result_nav_col .result-nav-btn--muted {
|
| 3195 |
+
font-size: var(--font-size-base) !important;
|
| 3196 |
font-weight: 500 !important;
|
| 3197 |
color: var(--c-text-muted) !important;
|
| 3198 |
}
|
|
|
|
| 3249 |
}
|
| 3250 |
.analysis-row-body {
|
| 3251 |
padding-left: 1.65rem; /* 對齊圖示右側,讓結論文字跟標題文字左緣一致 */
|
| 3252 |
+
font-size: var(--font-size-base);
|
| 3253 |
color: var(--c-text-soft);
|
| 3254 |
display: flex;
|
| 3255 |
flex-wrap: wrap;
|
|
|
|
| 3387 |
border: 1px solid var(--c-input-border) !important;
|
| 3388 |
border-radius: 9px !important;
|
| 3389 |
color: var(--c-text) !important;
|
| 3390 |
+
font-size: var(--font-size-base) !important;
|
| 3391 |
line-height: 1.6 !important;
|
| 3392 |
transition: border-color .18s ease, box-shadow .18s ease !important;
|
| 3393 |
}
|