Forum Discussion
Increase Font Size of List Web Part
TheWhiteGoose99 if you're using SharePoint Online, navigate to the list page and then select a column you want to change the font size to Column -> Column Settings -> Format This Column, a window appears on the right, Click Advanced Mode, and a text box appears for you to enter JSON code to manipulate the HTML. Copy and paste the Code snippet below into that JSON text box.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"font-size": "18pt"
}
}
You can change the value "18pt" to whatever you want. The formatting settings will carry over to the Web part. Here's a https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting to more JSON formatting if you're interested.
Edit: I realize that you said you were utilizing wiki pages? This method will work with Modern list pages. (Tested)
Tyler_Tucker Very successful with changing Text size!! But was not successful in a "Person" column that is displaying Person bubbles. When I use the Code snippet the bubbles change to [object Object]. Thanks for the support!
- Gerry_Brimacombe1520May 29, 2024Copper ContributorSee above. I haven't tested it, but try adding ".title" to the @currentField object.
"txtContent": "@currentField.title" - Gerry_Brimacombe1520May 29, 2024Copper ContributorIf you append ".title" the object, that should qualify the object enough to display.
Change:
"txtContent": "@currentField",
to
"txtContent": "@currentField.title",
It should work. Note however that the click/hover capabilities go away (can't click the username to see contact details). I'd love to know if there was a way around this! - Wedini85Nov 08, 2023Copper Contributor
aoconnor429 unfortunately not.
- aoconnor429Nov 08, 2023Copper Contributor
Wedini85 Were you able to fix this? I'm running into the same issue. Thanks.