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

Custom theme not working #1858

Closed
Nick-kel opened this issue Aug 29, 2021 · 2 comments
Closed

Custom theme not working #1858

Nick-kel opened this issue Aug 29, 2021 · 2 comments
Assignees

Comments

@Nick-kel
Copy link

Nick-kel commented Aug 29, 2021

What version of rsuite are you using?

5.0.0-beta.1

What version of React are you using?

17.0.2

What browser are you using?

Chrome

Describe the Bug

The custom theme in the config-overrides.js (e.g. the primary-color) is not working. It is still the default primary color.

Expected Behavior

The modified vars in the config-overrides.js should be used.

To Reproduce

config-overrides.js File: https://github.com/LupoBot/LupoWeb/blob/custom-theme/config-overrides.js
Commit: https://github.com/LupoBot/LupoWeb/commit/cd39f170e0fefc455cdbe832d2abec0d7eed6de7

@SevenOutman
Copy link
Member

SevenOutman commented Aug 30, 2021

Customizing Less variable only works when you are compiling the Less styles, but you are using compiled CSS.

https://github.com/LupoBot/LupoWeb/blob/cd39f170e0fefc455cdbe832d2abec0d7eed6de7/src/index.js#L4

Change this line to

import "rsuite/styles/index.less";

But before your do so

You need to upgrade to a newer beta version of RSuite because 5.0.0-beta.1 has other problems with Less styles itself.

@Nick-kel
Copy link
Author

Nick-kel commented Sep 1, 2021

Thank you!

@Nick-kel Nick-kel closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants