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

[RFC] Adopting CSS variables documentation #33417

Closed
siriwatknp opened this issue Jul 7, 2022 · 4 comments · Fixed by #33958
Closed

[RFC] Adopting CSS variables documentation #33417

siriwatknp opened this issue Jul 7, 2022 · 4 comments · Fixed by #33958
Labels
discussion docs Improvements or additions to the documentation RFC Request For Comments

Comments

@siriwatknp
Copy link
Member

siriwatknp commented Jul 7, 2022

This RFC list the overview of the new pages related to CSS variables that will be added to the docs.

Side Navigation

The pages will be listed under experimental apis

  • CSS variables
    • Overview (page)
      • Introduction: Explain the motivation, and the why. What are the benefits and how it works.
      • Trade-offs
      • Mental model: Explain the differences between the existing theming approach and the CSS variables way. Ex. don't use a conditional expression to use color between modes.
    • Usage (page): the demos of new APIs.
    • Customization (page)
      • Theming: How to customize the theme, adding new tokens, and what tokens are automatically generated (including typescript module augmentation).
      • Perfect dark mode: How to set up the app to have a perfect dark mode with some gotchas and warning.
      • Using theme tokens: Different ways to use variables from the theme. eg. in styled, system props in sx.
    • Migrating to CSS theme variables (page): A step-by-step guide for existing project to adopt CSS variables

If you have more ideas, feel free to comment and discuss.

@siriwatknp siriwatknp added the docs Improvements or additions to the documentation label Jul 7, 2022
@mnajdova
Copy link
Member

mnajdova commented Jul 7, 2022

The proposed structure look 👌 I would maybe also add sections about How to setup perfect dark mode

@danilo-leal
Copy link
Contributor

If each of these is meant to be a single page, I'm afraid it can be too overwhelming?! it's a lot of new pages to be added!
How about we merge Overview and Mental model into one page, then Tutorial, Theming, Perfect dark mode into another (all related to how-tos), and finally Migrate to CSS vars, and Using theme tokens into another?!

That way, we'd be adding only 3 pages-not counting the API documentation.

@siriwatknp
Copy link
Member Author

How about we merge Overview and Mental model into one page

Sounds good.

Tutorial

I am not sure about this, usually the tutorial should be one page but maybe we don't even need the tutorial at this point. (I will move tutorial to least priority and revisit once we have other pages again)

Theming, Perfect dark mode into another (all related to how-tos)

Sure, I put them under Customization, do you have a better name?

finally Migrate to CSS vars

I notice that we have Migration group in the sidebar, maybe the page should be under it? cc @samuelsycamore

@samuelsycamore
Copy link
Contributor

I notice that we have Migration group in the sidebar, maybe the page should be under it? cc @samuelsycamore

That's an interesting question @siriwatknp. I'm thinking that a "Migrating to CSS vars" page should probably live next to the other CSS vars pages. The Migration section, in my eyes, should just be for upgrading major versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion docs Improvements or additions to the documentation RFC Request For Comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants