You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,10 @@ __Note__: This code is provided as a sample only. Keep in mind that Microsoft ma
9
9
10
10
When you need to make minor cosmetic changes to modern pages (e.g.: match your corporate branding guidelines) and cannot use placeholders,you can create a custom CSS and inject on every modern page.
11
11
12
+
In this example, we deploy the CSS in a shared location; this allows us to change the CSS file at any time without re-deploying or re-configuring the application customizer.
13
+
14
+
You can deploy the application customizer with different settings to point to different CSS files.
15
+
12
16
13
17
## Used SharePoint Framework Version
14
18
@@ -62,6 +66,15 @@ Version|Date|Comments
62
66
* update _serve.json_ pointing to your site collection home page change the `cssurl` property with the URL to your custom CSS.
63
67
* run _gulp serve_
64
68
69
+
## Deployment to Production
70
+
71
+
* located the `elements.xml` file, in the `sharepoint` > `assets` folder
72
+
* change the `ClientSideComponentProperties` to point to your custom CSS URL.
73
+
* run _gulp bundle --ship_
74
+
* run _gulp package-solution --ship_
75
+
* upload the `react-application-injectcss.sppkg` from the `sharepoint` folder to your App catalog.
76
+
* when prompted to deploy to all sites, choose the option that suits your needs.
77
+
65
78
## Features
66
79
67
80
Sample SharePoint Framework application customiser injecting a custom CSS in the HTML header.
0 commit comments