OfficeDev / office-ui-fabric-core

The front-end CSS framework for building experiences for Office and Microsoft 365.
https://developer.microsoft.com/en-us/fabric
Other
3.77k stars 467 forks source link

Office fabric ui core style stopped working #1248

Open premiimt20 opened 3 years ago

premiimt20 commented 3 years ago

Hi Team,

Today randomally All UI broke down from out SPfx webparts. We have used office fabric ui, with no javascript framework. there used to be class name ms-SPLegacyFabricBlock earlier but no it is missing from div. we have not uploaded new package since Oct 2020.

Thanks Prem Dubey

pavan2920 commented 3 years ago

:global{ @import 'node_modules/office-ui-fabric-react/dist/css/fabric.css'; }

You can try this pointing to the local folder instead of CDN. Works for me.

jnimmala commented 3 years ago

try adding fabric.css ref to project scss file @import '~office-ui-fabric-react/dist/css/fabric.css';

https://github.com/SharePoint/sp-dev-docs/issues/5763

pavan2920 commented 3 years ago

@jnimmala I had this file in scss file itself but it stopped working today so used above work around.

westleyMS commented 3 years ago

The product team has turned off a feature that may have contributed to this.

westleyMS commented 3 years ago

Just to make clear here that the feature is working again, and its failure was not intentional. You do have to add the property to SPFx 1.8.2 or later webparts in the manifest per this article- Safely use legacy Office UI Fabric Styles (after SPFx v1.8.2)

Here is the important part-

Ensure that the webpart manifest demands legacy Fabric core styles be loaded onto the page. This is done by specifying loadLegacyFabricCss: true in the solution manifest.

This is expected to consistently work going forward. This outage was not intentional.