Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Office fabric ui core style stopped working #1248

Open
premiimt20 opened this issue Feb 25, 2021 · 5 comments
Open

Office fabric ui core style stopped working #1248

premiimt20 opened this issue Feb 25, 2021 · 5 comments

Comments

@premiimt20
Copy link

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
Copy link

: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
Copy link

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

SharePoint/sp-dev-docs#5763

@pavan2920
Copy link

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

@westleyMS
Copy link

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

@westleyMS
Copy link

westleyMS commented Mar 4, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants