alphagov / govuk-prototype-kit

Rapidly create HTML prototypes of GOV.UK services
https://prototype-kit.service.gov.uk
MIT License
303 stars 236 forks source link

Can't modify some settings for plugins (like $govuk-suppressed-warnings) #2410

Open oscarduignan opened 3 months ago

oscarduignan commented 3 months ago

Description of the issue

a user should be able to customise sass settings for their plugins by creating and adding settings to app/assets/sass/settings.scss in their prototype, which is imported before the the plugin styles

hmrc-frontend uses some sass functions that generate sass deprecation warnings when it's installed in a prototype, and I tried to suppress these within a prototype by setting $govuk-suppressed-warnings in app/assets/sass/settings.scss, however it doesn't work, because the sass file generated by the prototype kit to import plugin styles defines (not as a default, and not appending to existing list if it's set) $govuk-suppressed-warnings

Steps to reproduce the issue

you can try running this example of the issue

Actual vs expected behaviour

would expect to be able to define $govuk-suppressed-warnings in app/assets/sass/settings.scss and have it apply to plugins

it's not possible for plugins to set a default value for $govuk-suppressed-warnings either, because the setting written into _plugins.scss will take precedence - and if they overwrite it, then plugins loaded further in the list will lose the value that's set in _plugins.scss "legacy-color-param"

Environment (where applicable)

all