codex-team / task-manager

3 stars 2 forks source link

How can we use themes in our application #33

Open ilyamore88 opened 2 years ago

ilyamore88 commented 2 years ago

Need research how we can use themes in our application. With this feature we can easily implement dark and other themes. https://styled-components.com/docs/advanced#theming

iegik commented 2 years ago

For dark theme we can use media queries

  @media (prefers-color-scheme: dark) {
    --background-color: #1e1e1e;
    --color: #ffffffde;
    --color-overlay: #333333f0;
    --color-primary-contrast: #111111;
    --color-primary-dark: #54b3b8d9;
  }
ilyamore88 commented 2 years ago

Hi, @iegik. We're using styled-component library in our project. There is an API for using themes by JS code and ThemeProvider. I've added the link on docs and you can check it.

I marked this issue as spike cause there is no design for themes. Need to check docs, create a ticket for designer with requirements, and create a ticket for developers after that.

But I think it isn't important for now.

iegik commented 2 years ago

@ilyamore88 Yeah, I sew the Styled documentation. But I think, that dark/light themes and "other" themes is a little bit different. For example, @media (prefers-color-scheme: dark) checks if you have chosen "Dark" theme in OS and you can switch between light/dark. But with ThemeProvider you can force to choose concrete theme.

Screenshot 2022-02-01 at 02 11 23

when "Auto" option selected.

But I think it isn't important for now. P.S. Just getting to know the product and sharing my experience.