mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 19:49:59 +08:00
docs: fix dark mode refresh miss dark attr (#47558)
* docs: fix dark mode refresh miss dark attr * docs: fix dark mode refresh miss dark attr
This commit is contained in:
parent
1b696510e5
commit
0a83d5b34b
@ -112,6 +112,10 @@ const GlobalLayout: React.FC = () => {
|
||||
direction: _direction === 'rtl' ? 'rtl' : 'ltr',
|
||||
// bannerVisible: storedBannerVisibleLastTime ? !!storedBannerVisible : true,
|
||||
});
|
||||
document.documentElement.setAttribute(
|
||||
'data-prefers-color',
|
||||
_theme.includes('dark') ? 'dark' : 'light',
|
||||
);
|
||||
// Handle isMobile
|
||||
updateMobileMode();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user