Forum Discussion
Sandie Fry
Aug 05, 2020Copper Contributor
SharePoint List - Conditional Formatting - Links
I'm using Conditional Formatting to turn a URL into a friendlier looking link, but I don't seem to be able to style it at all. I'm pretty new to this conditional formatting thing, so this is more of...
- Aug 06, 2020
So it looks like I was just putting the Styling in the wrong place, I thought it had to go in "attributes"
// AEM6 Production { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "a", "style": { "text-decoration": "none", "font-size": "24px" }, "txtContent": "", "attributes": { "iconName": "=if(@currentField == '0', '', 'Design')", "target": "_blank", "title": "AEM6 Production", "class": "ms-fontColor-themeDark", "href": "@currentField" } }
jab365cloud
Aug 06, 2020Iron Contributor
No that file you can style the a element. But have you take a look at the github columns formating sample at https://github.com/pnp/sp-dev-list-formatting/tree/master/column-samples ? You should be able to do mostly anything you need and one option would be to renegerate div with child element and style you need.