How to change font size for all rows in a list using JSON on SP Online via Format View
-
07-02-2021 - |
質問
I know that I can format each column view by "Format This Column" but is there a way to format the whole list in the same manner? In particular, increasing the font size or any of the font attributes by using JSON?
解決
If you want to format the whole list view, I suggest you use View Formatting to achieve it.
The following article with the example code for your reference.
sp-dev-list-formatting-view-samples
If you only want to increasing the font size, we can use the following JSON formatting to achieve it.
{
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "sp-field-fontSize24"
}
And we can use the following Class to adjust the font size.
sp-field-fontSize14
sp-field-fontSize15
sp-field-fontSize17
sp-field-fontSize21
sp-field-fontSize24
sp-field-fontSize28
sp-field-fontSize32
sp-field-fontSize36
sp-field-fontSize42