outlookoffice-ui-fabric

How can I get an Outlook Office Addin using the Office UI Fabric to pick up the users current theme in OWA


I'm using the primary theme colours from Office UI Fabric Core, but no matter which theme I change to in Outlook Web Access my add-in colors don't change. It's constantly using the default blue.

I've tried clear browser history/cache, different users, different browsers, different machines.

When displaying an Outlook Add-in in OWA the add-in is displayed in its own sandboxed iframe (if this helps someone who knows how the dynamic theme mechanism is suppose to work).


Solution

  • Office UI Fabric team member here. Sorry for the incredibly long delay, I'm just now seeing questions about Fabric on SO.

    This question has come up a number of other times and is a scenario we hope to address soon. I don't have a great answer for when we can enable picking up & applying specific Office client themes, but know that this is important for us to support in our own product scenarios, so I'd expect to see developments here soon. We'll be working with specific product teams to figure out the best way to handle this from a technical perspective.

    That said, in the meantime, it is actually possible to load themed styles in Fabric-React today that should give you an indicator of what the solution might look like: try changing a theme color like themePrimary on this page, then view a component like Button to see that change reflected there. I imagine the solution we end up with will look similar to this.