Forum Discussion
List Style in Modern experience not working
Hello!
I have created a list with a "Shaded" Style. If the list is on Classic mode, the links are nice and blue and the shading works perfectly, but if I view the list in modern experience, all of the formatting disappears, why is that?
Thank you!
yuyitax sorry the JSON code got changed during the copy and paste, hopefully now corrected. The code is:
{
"$schema":
"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"color": "#0000ff"
}
}Rob
Los Gallardos
Microsoft Power Automate Community Super User
6 Replies
- RobElliottSilver Contributor
Hi yuyitax lists in the modern experience are formatted in a different way to classic lists. For some column types you can select the formatting. Click on the dropdown arrow next to the column, select Column settings and then click Format this column
To do something like setting the text color for a particular column you'd do the same:
but then in the in the format box that appears on the right you'd enter (or copy/paste) JSON code:I set the color of the "County" column to a shade of blue and the JSON syntax for that was:
{
"$schema":
"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"color": "#0000ff"
}
}The formatting of modern lists is more powerful than on classic lists and allows you to add, for example, buttons to trigger a flow and do other actions:
Rob
Los Gallardos
Microsoft Power Automate Community Super User- yuyitaxCopper Contributor
Hi Rob,
Thank you for your fast help. I tried using the blue shade code that you share but i get an error that says to use a valid column-formatting JSON. Any idea why?
- RobElliottSilver Contributor
yuyitax sorry the JSON code got changed during the copy and paste, hopefully now corrected. The code is:
{
"$schema":
"https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"color": "#0000ff"
}
}Rob
Los Gallardos
Microsoft Power Automate Community Super User