Icons in UI theme


#1

I want to add custom icons via background-image, now if I use background-image: url('../icons/custom-icon.svg')
the error I get in my console = GET file:///Applications/Atom.app/Contents/Resources/app.asar/icons/icon-regex.svg net::ERR_FILE_NOT_FOUND

Which means that the source of the icons fails.
Anyone knows how to do this?


#2

You can use the Developer Tools to inspect any element of the editor. I’ve used it to inspect the icon-theme I’m currently using:

url(atom://logo-file-icons/icons/nsis.svg);

For clarity, that is atom://<PACKAGE NAME>/path/to/icon.svg


#3

Hey idleberg,

Thank you for replying! Can you give an more in depth example?
When I use your example in my ui theme it keeps saying: GET atom://citylights-ui/icons/icon-regex.svg net::ERR_FILE_NOT_FOUND Completely different path as you can see…


#4

I fixed it by not using the --dev mode and link the package in atom.
something like this should be in the doc, atleast more highlighted :stuck_out_tongue: