I'm creating a custom formatting for the Title column of a document library so that users will always download the documents instead of opening them directly.
It's turning out well, but I can't figure one styling detail: I want the link to underline when hovered.
so in pseudo formatting code: style:hover{ text-decoration: underline; }
. The link itself is already styled as shown below
{
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json",
"elmType": "a",
"txtContent": "@currentField",
"style": {
"color": "#272727",
"text-decoration": "none",
"font-size": "14px"
},
"attributes": {
"target": "_blank",
"href": {
"operator": "+",
"operands": [
"http://tenant.sharepoint.com/sitename/_layouts/download.aspx?SourceUrl=http://tenant.sharepoint.com/sitename/Library/",
"@currentField"
]
}
}
}