diff --git a/docs/devnotes.md b/docs/devnotes.md
index fc2d7ad..6e10652 100644
--- a/docs/devnotes.md
+++ b/docs/devnotes.md
@@ -99,10 +99,22 @@ by the component file, so the side effect will be applied by the bundler.
The speicifc component uses a root class to scope the rulesets' scope. This convention allows the component's style can be influenced
by the other stylesheets. It works because Tutu is an end-user application, we gain the control of all stylesheets in the app (kind of).
+Keep in mind that the native stylesheets will be applied globally at any time, you must carefully craft the stylesheet to avoid leaking
+of style.
-Styled component is still existing for its own good: decalrable and scoped by randomized names.
-Though styled component, using attributes for scoping, may not be as performant as the techniques with CSS class names;
-It's still provided in the Tutu's code infrastructure for its ease (it even provides a bridge to use js variable in css!).
+Three additional CSS layers are declared as:
+
+- compat: Compatibility rules, like normalize.css
+- theme: The theme rules
+- material: The internal material styles
+
+When working on the material package, if the style is intended to work with the user styles,
+it must be declared under the material layer. Otherwise the unlayer, which has the
+highest priority in the author's, can be used.
+
+Styled component is still existing. Though styled component, using attributes for scoping,
+may not be as performant as the techniques with CSS class names;
+it's still provided in the code infrastructure for its ease.
The following is an example of the recommended usage of solid-styled:
@@ -123,7 +135,7 @@ const Component = () => {
};
```
-Native CSS is always recommended. When developing new component, you can use styled component first, and migrate
+When developing new component, you can use styled component at first, and migrate
to native css slowly.
Before v2.0.0, there are CSS modules in use, but they are removed:
diff --git a/src/App.css b/src/App.css
index 70ee2fb..d2643a9 100644
--- a/src/App.css
+++ b/src/App.css
@@ -1,41 +1,46 @@
-@import "normalize.css/normalize.css";
-@import "./material/theme.css";
+@layer compat, theme, material;
-:root {
- --safe-area-inset-top: env(safe-area-inset-top);
- --safe-area-inset-left: env(safe-area-inset-left);
- --safe-area-inset-bottom: env(safe-area-inset-bottom);
- --safe-area-inset-right: env(safe-area-inset-right);
- background-color: var(--tutu-color-surface, transparent);
-}
+@import "normalize.css/normalize.css" layer(compat);
+@import "./material/theme.css" layer(theme);
+@import "./material/material.css" layer(material);
-/*
-Fix the bottom gap on iOS standalone.
-https://stackoverflow.com/questions/66005655/pwa-ios-child-of-body-not-taking-100-height-gap-on-bottom
-*/
-@media screen and (display-mode: standalone) {
- body {
- width: 100%;
- height: 100vh;
+@layer compat {
+ :root {
+ --safe-area-inset-top: env(safe-area-inset-top);
+ --safe-area-inset-left: env(safe-area-inset-left);
+ --safe-area-inset-bottom: env(safe-area-inset-bottom);
+ --safe-area-inset-right: env(safe-area-inset-right);
+ background-color: var(--tutu-color-surface, transparent);
}
- #root {
- position: fixed;
- top: 0;
- left: 0;
- height: 100vh;
- width: 100vw;
+ /*
+ Fix the bottom gap on iOS standalone.
+ https://stackoverflow.com/questions/66005655/pwa-ios-child-of-body-not-taking-100-height-gap-on-bottom
+ */
+ @media screen and (display-mode: standalone) {
+ body {
+ width: 100%;
+ height: 100vh;
+ }
+
+ #root {
+ position: fixed;
+ top: 0;
+ left: 0;
+ height: 100vh;
+ width: 100vw;
+ }
+ }
+
+ h1 {
+ margin: 0;
+ }
+
+ * {
+ user-select: none;
}
}
.custom-emoji {
width: 1em;
-}
-
-h1 {
- margin: 0;
-}
-
-* {
- user-select: none;
-}
+}
\ No newline at end of file
diff --git a/src/accounts/MastodonOAuth2Callback.css b/src/accounts/MastodonOAuth2Callback.css
new file mode 100644
index 0000000..c150d03
--- /dev/null
+++ b/src/accounts/MastodonOAuth2Callback.css
@@ -0,0 +1,22 @@
+.MastodonOAuth2Callback {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ width: 448px;
+
+ @media (max-width: 600px) {
+ & {
+ position: static;
+ height: 100%;
+ width: 100%;
+ left: 0;
+ right: 0;
+ transform: none;
+ display: grid;
+ grid-template-rows: 1fr auto;
+ height: 100vh;
+ overflow: auto;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/accounts/MastodonOAuth2Callback.tsx b/src/accounts/MastodonOAuth2Callback.tsx
index ae7255c..d530095 100644
--- a/src/accounts/MastodonOAuth2Callback.tsx
+++ b/src/accounts/MastodonOAuth2Callback.tsx
@@ -8,7 +8,7 @@ import {
} from "solid-js";
import { acceptAccountViaAuthCode } from "./stores";
import { $settings } from "../settings/stores";
-import cards from "~material/cards.module.css";
+import "~material/cards.css";
import { LinearProgress } from "@suid/material";
import Img from "~material/Img";
import { createRestAPIClient } from "masto";
@@ -92,11 +92,11 @@ const MastodonOAuth2Callback: Component = () => {
});
return (
<>
-
Authorization is failed.
{params.errorDescription}
@@ -125,7 +125,7 @@ const SignIn: Component = () => {