Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate base css for web app #7

Open
MartinBspheroid opened this issue Jan 6, 2025 · 2 comments
Open

Generate base css for web app #7

MartinBspheroid opened this issue Jan 6, 2025 · 2 comments
Labels
DOM DOM backend related feature New feature or request

Comments

@MartinBspheroid
Copy link
Collaborator

MartinBspheroid commented Jan 6, 2025

Move away from hardcoded CSS by generating a dynamic stylesheet based on the current system theme and user preferences.

On initial load, determine the system theme (e.g., light/dark) and user preferences (e.g., font size, primary colors) to create and inject a base CSS file into the web app.
Provide a hook to allow users to change the theme and preferences dynamically, and re-generate the CSS as needed.

Ideas/Features:

  • ✔️ Generate and inject base CSS on initial load.
  • Allow users to update preferences through a hook (e.g., useThemePreferences).
  • Ensure dynamic updates do not cause page flicker or reloading.
  • Add support for saving preferences to localStorage or a similar mechanism for persistence.
@MartinBspheroid MartinBspheroid added the feature New feature or request label Jan 6, 2025
@MartinBspheroid
Copy link
Collaborator Author

first point done, along with support for #10

✔️ Generate and inject base CSS on initial load

@orhun
Copy link
Owner

orhun commented Jan 8, 2025

That looks good to me already!

@MartinBspheroid MartinBspheroid added the DOM DOM backend related label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOM DOM backend related feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants