mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix: use data-font attribute instead of inline style for font toggle (#1552)
* fix: use data-font attribute instead of inline style for font toggle * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: use inline style for font-body-base to win cascade over variant themes Copilot review flagged that [data-font="system"] in @layer base loses to unlayered variant themes (e.g. happy-theme sets --font-body: Nunito). Switch back to inline style on --font-body-base so user font preference always wins the cascade, while keeping the RTL/CJK composition via var(--font-body-base) fallback. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Elie Habib <elie.habib@gmail.com>
This commit is contained in:
@@ -55,16 +55,19 @@
|
||||
|
||||
/* Font stack */
|
||||
--font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Fira Code', 'DejaVu Sans Mono', 'Liberation Mono', monospace;
|
||||
--font-body: var(--font-mono);
|
||||
/* Base body font, controlled by font preference (mono vs system) */
|
||||
--font-body-base: var(--font-mono);
|
||||
/* Effective body font used throughout the app */
|
||||
--font-body: var(--font-body-base);
|
||||
}
|
||||
|
||||
[dir="rtl"] {
|
||||
--font-body: 'Tajawal', 'Geeza Pro', 'SF Arabic', 'Tahoma', system-ui, sans-serif;
|
||||
--font-body: 'Tajawal', 'Geeza Pro', 'SF Arabic', 'Tahoma', var(--font-body-base);
|
||||
}
|
||||
|
||||
:lang(zh-CN),
|
||||
:lang(zh) {
|
||||
--font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
|
||||
--font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', var(--font-body-base);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
|
||||
Reference in New Issue
Block a user