scottish-government-design-system / design-system

Design System for the Scottish Government and other Scottish public sector bodies
https://designsystem.gov.scot
MIT License
25 stars 11 forks source link

SVG blocked outside of gov.scot #2

Closed craigo1409 closed 9 months ago

craigo1409 commented 3 years ago

Hi,

I'm trying to use this within our NHS application but getting blocked error when accessing icons.stack.svg. This breaks a number of components (DatePicker calendar, Radio Buttons, Checkmarks).

I have tested this on localhost and pushed in our test environment and behaviour is consistent.

image

DavidChristiansen commented 3 years ago

Solve this by overriding the $iconsfile variable with the path to your icon.stack.svg file, before you import the scss files into yours.

for example

    $iconsfile: '/img/icons.stack.svg';
    @import '/path/to/base/node_modules/@scottish-government/pattern-library/src/base/_all-base';

HTH

jsutcliffe commented 9 months ago

Thank you @DavidChristiansen. That is the intended way to specify your icons path.