Article
0 comment

Update on how to include 3rd party CSS in SharePoint Framework

Finally, we upgraded SASS to a new version of SASS, which brings tons of changes to your development. It started in SharePoint Framework version 1.15, and the transition is now completed in 1.16.1. While importing 3rd party CSS via ‘@import’ is still possible, this option will be lost at some point.

Title screen on Update on 3rd party CSS in SPFx

Let me explain what other options you have to import 3rd party CSS to your web parts or extension CSS.[Read more]

Article
0 comment

Build a SharePoint / Fluent UI compliant grid from scratch

Building a grid system in the past had a lot to do with math. Luckily, implementing a grid system has dramatically changed over the last years. You don’t rely on any framework such as Fluent UI to get your things done right.

SharePoint also has a concept of single part app pages. This page type gives you an entirely blank canvas, enabling the full potential and possibilities for an application. It also comes without any grid system, but this is something we can address.

[Read more]

Article
0 comment

SPFx-uifabric-themes v0.7.0 released aka SPFx-uifabric-themes AliceBlue

Its been a while since the last release for my toolset for Theming in SharePoint development. I work on a product, and I have to make sure that the web part design is flexible enough to work great with any SharePoint applied theme. I discovered many changes in the currently available theme slots.

v0.7.0-release-AliceBlue

The support in case of SASS variables in your standard SharePoint project is limited. It was time to update my tool, but it comes with more great features that only SASS variables.

[Read more]

Article
3 comments

How to better control CSS class naming in SPFx

CSS is currently not capable of scoping the design only to a component on a web page. It is just possible through different class names for elements on the page. To avoid the inference of same style sheet classes on the same page, SPFx post-fix every class name used in the web parts CSS files. There are also hidden gems that allow you to change this behaviour dynamically as required and sometime the class names shouldn’t be renamed at all cost. Enough about the theory lets take a closer more detailed look.

[Read more]

Article
0 comment

NPM Package for Office UI Fabric colours released – Ok a while back

A while back I wrote about on how to use the theme slots in the SPFx projects through SASS. It allows you to write web parts that reflect the default theme colours of a site. Instead, using fixed colour values, you can use variables in the CSS code of your artefacts.


To make the overall process faster I recently released and NPM packages including all the SASS colours plus some extras.

[Read more]

Article
0 comment

Handling CSS naming conventions in SPFX

The new SharePoint Framework has a smart way to avoid conflicting CSS definitions. Therefore all style sheet classes will be post-fixed with a unique random string and converted to a JSON object. In your web part code, you can use the same class name as you used in your style sheets and the variable will be automatically replaced with the random class name string. So far the good parts of the SharePoint Framework.

In practice, this has some limitations and challenges.

[Read more]