Office UI Fabric and Office 365 Theme support for SharePoint Framework Projects
This NPM package allows you to use theme token from Office UI Frabric in SharPoint Framework Projects.
Create a new SharePoint Framework Project and add this package to your project.
npm install --save-dev spfx-uifabric-themes
After this installation this package should be listed as a dev dependency in your SPFX Project.
Go to any of your
.module.scss files in your project and include the following SASS @import statement
// For all tools and utlities;
If only the color variables are needed in the SPFX Project only the variables can be included too.
// For color variables only;
After that you can use theme slots like
;.container// For Error Messages use you can pass: alert, error, info, servere, success.custErrorMsg
This will automatically add the theme slot for the background color.
CSS Variable support for SPFx projects
You will find all additional functions in the documentation:
Create font-weight, font-styles and general text styles
- State styles
Creates alert, error, info, server and success styles
Copyright (c) 2017 Stefan Bauer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.