Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(component): revert theme flickering (#5238) (#5256)

Peng Xiaocfd200528fcf
diff --git a/packages/frontend/component/src/theme/theme.css.ts b/packages/frontend/component/src/theme/theme.css.ts
index c471d45a1f..24187dc84a 100644
--- a/packages/frontend/component/src/theme/theme.css.ts
+++ b/packages/frontend/component/src/theme/theme.css.ts
@@ -11,12 +11,8 @@ globalStyle('html', {
vars: lightCssVariables,
});
-globalStyle('html', {
- '@media': {
- '(prefers-color-scheme: dark)': {
- vars: darkCssVariables,
- },
- },
+globalStyle('html[data-theme="dark"]', {
+ vars: darkCssVariables,
});
if (process.env.NODE_ENV === 'development') {
diff --git a/packages/frontend/core/.webpack/template.html b/packages/frontend/core/.webpack/template.html
index 0b8b6e4710..4c0ee95014 100644
--- a/packages/frontend/core/.webpack/template.html
+++ b/packages/frontend/core/.webpack/template.html
@@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="utf-8" />
- <meta name="color-scheme" content="light dark" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"