The default assets path assume there is directory with assets at /assets/.
For example /assets/images/loupe.svg .
This is declared in @id-sk/frontend/idsk/components/search-results/search-results.scss
as background-image: idsk-image-url("loupe.svg");. The idsk-image-urlfunction by default employs the $idsk-assets-path property. As a result changing this property to ../node_modules/@id-sk/frontend/idsk/assets/ allow a user to avoid the need to copy all the assets .... except it does not.
This cause another problem, for example 'govuk-crest.png'. This asset is used on two files:
While the first use can be fixed by $govuk-assets-path: "../node_modules/@id-sk/frontend/govuk/assets/" the second one can't.
The reason is that the govuk-crest.pngis not in the idsk asset file. This effectively force users to create an asset directory and copy all assets there.
A solution would be to employ the govuk function for resources from govuk and only employ idsk functions for assets in the isdk asset directory.
Another solution would be to copy all default resrouces from govuk to idsk here in the repository.
This does not apply only to images, but to all assets in general.
The default assets path assume there is directory with assets at
/assets/
.For example
/assets/images/loupe.svg
. This is declared in@id-sk/frontend/idsk/components/search-results/search-results.scss
asbackground-image: idsk-image-url("loupe.svg");
. Theidsk-image-url
function by default employs the$idsk-assets-path
property. As a result changing this property to../node_modules/@id-sk/frontend/idsk/assets/
allow a user to avoid the need to copy all the assets .... except it does not.This cause another problem, for example
'govuk-crest.png'
. This asset is used on two files:While the first use can be fixed by
$govuk-assets-path: "../node_modules/@id-sk/frontend/govuk/assets/"
the second one can't.The reason is that the
govuk-crest.png
is not in theidsk
asset file. This effectively force users to create an asset directory and copy all assets there.A solution would be to employ the govuk function for resources from govuk and only employ idsk functions for assets in the isdk asset directory.
Another solution would be to copy all default resrouces from govuk to idsk here in the repository.
This does not apply only to images, but to all assets in general.