Available Classes
I see random references to mystical classes in examples sp-field-severity–good, sp-field-severity–low, sp-field-severity–warning, sp-field-severity–blocked But Fabric UI classes seem unavailable and importing css is not supported. Is there a list of css we can utilize in List formatting or are we expected to write everything as inline styles?
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Hi @XopherDesign.
You can some style guidelines here in the List Formatting docs: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#style-guidelines
So there are only 10 classes available?
@XopherDesign Did you read the documentation thoroughly?
Notice the section underneath that says...
In addition to the classes listed above, the classes (such as the theme color, typography, grid system, etc.) defined by the Office UI Fabric can be used. For details, see the Fabric website.
Fabric styles are already loaded on the page by default. You can use the classes provided by Office UI Fabric as defined on the website, as SharePoint will already have the reference to the css required.
OK it looks like they do make the theme colors available in the following format ms-fontColor-themePrimary But I can't seem to get any of the other fabric.css classes to work like the following https://developer.microsoft.com/en-us/fabric#/styles/web/elevation Everything UI Fabric based seems to point you to SCSS for SPFX web parts, it's hard to get info for using OOTB stuff like formatting.
Everything UI Fabric based seems to point you to SCSS for SPFX web parts, it's hard to get info for using OOTB stuff like formatting.
I don't disagree. Also it's tough sometimes because the current version of Fabric on the website may not match the current version of UI Fabric being used in SharePoint. In terms of column formatting, sticking to classes available for Typography, Theme Colors, Icons. I believe elevation and motion are a part of the fluid framework, not quite available yet for use in SharePoint. -- So I completely understand the frustration.
For now, we'll need to mix and match some office ui styles when we can, and inline-styles when we have limitations. Hope this helps.
Closing issue as "answered". If you encounter similar issue(s), please open up a NEW issue. Thank you.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues