Forum Discussion
Alan Trafford
Dec 05, 2017Brass Contributor
SPFx Extension: Dependency on css class names
Hi
I've created a SharePoint Framework Extension that does the following:
Adds a print stylesheet (@media print)
Hides elements.
Applies a watermark.
Adds a custom footer to the bo...
Dec 05, 2017
I would be very concerned personally as the code can break at any time
I would follow the application customizer approach as that is the only one that guaranties that your code will always have the required dependencies on the page.
Alan Trafford
Dec 05, 2017Brass Contributor
I'm familiar with the example, in fact, that's the starting point for my extension. I've modelled the footer in both the application customizer (placeholder) way and the JavaScript injection way. I'm hoping my company will accept the application customizer way.
That still leaves me with the print stylesheet task. As there is no inbuilt way to achieve this, the only solution I can currently think of is to reference the CSS classes. I don't like this solution as it is brittle.