-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Context
PR #1393 added a font family toggle that sets --font-body via document.documentElement.style.setProperty(). This inline style has higher specificity than the [dir="rtl"] CSS rule that sets --font-body to Arabic/Hebrew fonts.
Problem
When a user selects "System Default" font and the page is in RTL mode, the inline style wins over the CSS [dir="rtl"] rule, potentially breaking Arabic/Hebrew text rendering.
Proposed Fix
Use a data-font attribute on <html> instead of inline style:
applyFont()setsdocument.documentElement.dataset.font = 'system'- CSS:
[data-font="system"] { --font-body: system-ui, ... } [dir="rtl"]rule naturally overrides since it's more specific or later in cascade
Follow-up from PR #1393.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working