diff --git a/packages/common/styles.js b/packages/common/styles.js index 87b7f67951f7c793ffd625b52814e3bc3f67b63f..1ad9c80b3937213117be32dff21da8fa1c710878 100644 --- a/packages/common/styles.js +++ b/packages/common/styles.js @@ -1,4 +1,5 @@ -import {css} from 'lit-element'; +import {css, unsafeCSS} from 'lit-element'; +import {getIconSVGURL} from './vpu-icon.js'; /** * We want to have "neutral" colors here @@ -121,7 +122,7 @@ export function getGeneralCSS() { select:not(.select) { -moz-appearance: none; -webkit-appearance: none; - background: calc(100% - 0.2rem) center no-repeat url("/local/vpu-common/icons/chevron-down.svg"); + background: calc(100% - 0.2rem) center no-repeat url("${unsafeCSS(getIconSVGURL('chevron-down'))}"); background-size: 25%; border-color: black; border-width: 1px; diff --git a/packages/common/vpu-icon.js b/packages/common/vpu-icon.js index af0e448778d9b9a8f6725c8a38545fdd83d7139a..c6e8bd39bdd2d472d35e20e7bf820aa12709534a 100644 --- a/packages/common/vpu-icon.js +++ b/packages/common/vpu-icon.js @@ -17,7 +17,7 @@ const errorIcon = ` </svg> `; -function getIconSVGURL(name) { +export function getIconSVGURL(name) { return commonUtils.getAssetURL('local/vpu-common/icons/' + encodeURI(name) + '.svg'); }