1

I have created SharePoint hosted app using VS2015, and in that, i have used Office UI fabric react components. I have installed it and other packages of React and React-dom using npm, App is successfully deployed on my developer site. But fabric CSS is not rendering on my react components. If I explicitly give link to fabric.css like

<link  href="../node_modules/office-ui-fabric-react/dist/css/fabric.min.css"rel="stylesheet" /> 

on my default.aspx, it works. I want to ask that is there anyway, maybe, some configuration file where I just specify this

{
  ...  css : 'node_modules/office-ui-fabric-react'
  ...
}

to render CSS on the page. If I use the same procedure with my SharePoint framework app CSS renders without any issue. Also, SharePoint theme color is not being applied to my components. In the attached image, blue color should be replaced by the green. Is it so ?? Can I use Office fabric for applications other than SharePoint framework apps?

Attached is the image of my app. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.