Since I updated my SPFx webpart today to
> npm update:
+-- @microsoft/[email protected]
+-- @microsoft/[email protected]
+-- @microsoft/[email protected]
+-- @microsoft/[email protected]
+-- @microsoft/[email protected]
`-- @types/[email protected]
> npm ls office-ui-fabric-react
`-- @microsoft/[email protected]
`-- [email protected]
from using office-ui-fabric-react
2.31
, I have issues using the CSS styles like ms-font-m
. In all my .module.scss
files I used @import "~office-ui-fabric-react/dist/sass/Fabric.Common";
. That does not seem to exist anymore or moved. I did set my fonts like:
.iLoggerClientCalloutHeading {
@include ms-font-m;
@include ms-fontWeight-semibold;
}
I saw to import { FontClassNames } from '@uifabric/styling';
in the .tsx
file and use <div className={ css(FontClassNames.medium) }>
. Is this the way? It seems I am missing something here, specifying styling once in a css-class seems more reasonable to me, than specifying it for each element in the .tsx
code.
I was not able to use $ms-color-themeLight
either. I created a _theme.module.scss
from GitHub/StfBauer/_theming.scss and the colours work.
How do I reference/use the ms-font classes in my SPFx .scss
files? Any help is much appreciated.
<div className={ css( 'ms-font-m' ) } />
? If so, then I would need to specify thems-font-m
for each column header, instead I did<div className={ css( styles.columnHeader ) }>Header 1</div>
,<div className={ css( styles.columnHeader ) }>Header 2</div>
, ...<div className={"ms-font-m"}>