fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Styles in SPFX doesnt work

Open enti333 opened this issue 7 years ago • 4 comments

Hello. After I updated SPFX to version 1.8.1 styles doesn't work:

For example I have used this before and everything was working but right not.

text

Full code: `import * as React from 'react'; import styles from './Testmsfont.module.scss'; import { ITestmsfontProps } from './ITestmsfontProps'; import { escape } from '@microsoft/sp-lodash-subset';

import { css, classNamesFunction } from 'office-ui-fabric-react/lib/Utilities'; import { DefaultButton, PrimaryButton, IButtonProps } from 'office-ui-fabric-react/lib/Button'; import { Label } from 'office-ui-fabric-react/lib/Label';

export default class Testmsfont extends React.Component<ITestmsfontProps, {}> { public render(): React.ReactElement { return ( <div className={ styles.testmsfont }> <div className={ styles.container }> <div className={ styles.row }> <div className={ styles.column }> <span className={ styles.title }>Welcome to SharePoint! <p className={ styles.subTitle }>Customize SharePoint experiences using Web Parts.

<p className={ styles.description }>{escape(this.props.description)}

          <p className={"ms-font-su"} >text</p>
          <PrimaryButton>test</PrimaryButton>
          
          <a href="https://aka.ms/spfx" className={ styles.button }>
            <span className={ styles.label }>Learn more</span>
          </a>
        </div>
      </div>
    </div>
  </div>
);

} }`

What can be a problem please. Thank you.

PS: test this is working fine ....

enti333 avatar Apr 27 '19 08:04 enti333

@enti333 Are you referring to the -ms-font-su classname as not working? Trying to understand what you're having issues with. If you could provide more details on what you're talking about; maybe a screenshot, or the exact "expected" and "resulted" outcomes, we could help better.

dzearing avatar Apr 29 '19 16:04 dzearing

Hello. Thank you very much for answer. Here are details: I am developing SPFX wabparts...All my webparts use Office fabric react UI and Office fabric Styles For example ms-font-su for some headers....Everything was working in SPFX 1.7.1. After I have updated to new version of SPFX 1.8.0 or 1.8.1 Office fabric react UI controls still work and even better because right now SPFX use version 6.1.143 but my base styles stop to work....

I am not sure what happen. When I downgrade again to 1.7.1 styles again start to work.... Thank you

enti333 avatar Apr 30 '19 07:04 enti333

I think this issue might be more appropriate for sp-dev-docs

Also in the v1.8.0 release notes I found "Deprecating legacy Fabric CSS consumption", which might be the reason your base styles stopped working upon upgrade?

atneik avatar Apr 30 '19 17:04 atneik

Thank you very much. Right now I see it. Thanks again

enti333 avatar Apr 30 '19 19:04 enti333