Hi
So I have a custom element with the following structure
root/src/resources/elements/notification/notification.ts
root/src/resources/elements/notification/notification.html
root/src/resources/elements/notification/notification.css
root/src/resources/elements/notification/images
root/src/resources/elements/notification/images/notification.png
This works. However, passing the relative path to the image from the css does not.
ie
.notification {
position: absolute;
background:transparent url(./images/notification.png) no-repeat top left;
}
If I look at the generated css in the chrome debugger I see
url(resources/elements/notification/images/notification.png) no-repeat top
ie. I need to add the src part of the url.
The relative stuff works when specifying my css from the html file.
ie
<require from="./notification.css"></require>
What is best practice here ?
Thanks