Forum Discussion

Rob_Lam's avatar
Rob_Lam
Brass Contributor
Jun 05, 2024

JSON formatting List Help?

Hi Guys

 

I'm new to JSON and I'm trying to make all the font size in each of the column bigger

 

I tried this

 

{
"additionalRowClass": "=if(@rowIndex % 2 == 0,'ms-bgColor-communicationTint20 ms-bgColor-communicationTint20--hover','')",
"style": {
"font-size": "20px"
}
}
 
While it changes the color of the alternating columns to light blue the font sizes doesn't increase or decrease.
Am I doing something wrong?
  • Rob_Elliott's avatar
    Rob_Elliott
    Bronze Contributor

    Rob_Lam for the font-size you need to use column formatting on each column as with the JSON below. You can still use view formatting to get the alternating row colors.

     

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "@currentField",
      "style": {
        "font-weight": "bold",
        "font-size": "20px",
        "color": "teal",
        "background-color": "#d4e4dd",
        "padding-left": "14px"
      }
    }

     

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Resources