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

how to override styling in default css for a themed component #85

Open
idavollen opened this issue Feb 14, 2018 · 0 comments
Open

how to override styling in default css for a themed component #85

idavollen opened this issue Feb 14, 2018 · 0 comments

Comments

@idavollen
Copy link

idavollen commented Feb 14, 2018

quotation from README, "There are three possible sources for your component. Sorted by priority: context, configuration and props" hints to me that theme in context has lowest priority, then configuration(local theme or default theme) with higher priority, right?

Given that I decorated my Button react component (@TheMr("MyButton", defaultTheme)) with default.css

.button { background-color: blue; color: white }
and then I've got a customer.css to customize that button:
.button { background-color: #003366; color: red }

the customer.css was imported and sent in as context theme to Button component.
I am wondering how I could override the default theme with the theme in context? It seems impossible at all because context them has lower priority than localTheme (default.css)

The other issue is that if { composeTheme: 'deeply' } is being used, both context theme and local theme(default.css) has background-color, the final visual background result of button is dependent/undetermined for it depends on the order of who comes after whom in bundled resource

Should context theme have higher priority then local theme so that it is easier to override the default one with context theme?

Thanks in advance!

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

1 participant