Thanks for this tip, it was really helpful. I wasn't familiar with the a[data-resource-id] selector before.
How are you adding the resource icons for different filetypes?
As for the Joplin J, I ended up just making it much smaller, will see how that goes. 
![]()
If anyone wants that code, change this in userstyle.css. Might need to tweak it based on your font sizes:
.resource-icon {
width: 10px;
height: 12px;
top: 0.1em;
}