Forum Discussion
Change fonts on a document library view SharePoint 2019
We have a customer who has a requirement where they need to change the default text font colour for the columns in a document library, by default they are a light grey colour but the requirement is to change them to black. The current documentation suggests this can only be done with classic -
Use CSS to brand SharePoint pages | Microsoft Learn
What if any options are available to change the font colour in SharePoint 2019 on prem.
Hello IainL-Betasoft
you can try to use Column Formatting for that in SP2019:
https://support.microsoft.com/en-us/office/column-formatting-1f927342-2bed-4745-b727-ff8b7ff96b22
Examples:
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
Regards, Dave
IainL-Betasoft Kindly ignore my above response as view formatting is currently supported only in SharePoint Online and not supported in SP 2019.
But, if anyone is trying to do same in future in SP online, view formatting is better option for this.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
IainL-Betasoft Use "view formatting" instead of "column formatting". Using view formatting you can change font color of multiple columns at a time instead of adding same JSON in all columns. It will also help in case new columns will be created in list in future.
You can use simple JSON like below:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "additionalRowClass": "ms-fontColor-black" }
Documentation: view-list-formatting
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- IainL-BetasoftCopper ContributorAhh yeah, didn't realise this feature had made it to SharePoint 2019. Thanks
Hello IainL-Betasoft
you can try to use Column Formatting for that in SP2019:
https://support.microsoft.com/en-us/office/column-formatting-1f927342-2bed-4745-b727-ff8b7ff96b22
Examples:
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
Regards, Dave