Gershon Papi
Gershon Papi

Reputation: 5106

office-ui-fabric-react: loadTheme to change global CSS?

I'm using office-ui-fabric-react for my app, and I'm using the loadTheme to customize the color palette of my app.

Using loadTheme does change how my components behave but it doesn't affect the page's global CSS, like page background etc...
Given the fact that I also import the office-ui-fabric dist CSS, I would expect the CSS to be changed too, maybe through some CSS3 variables.

Is this not how it's supposed to work? should I set CSS manually on every loadTheme call?

Upvotes: 1

Views: 929

Answers (1)

Micah Godbolt
Micah Godbolt

Reputation: 224

I answered this on our Github page, but wanted to toss it in here too:

https://github.com/OfficeDev/office-ui-fabric-react/issues/5713

loadTheme only updates the theme object passed down to each component. It doesn't add any css to the page. This is very intentional.

Upvotes: 3

Related Questions