Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oscarduignan opened this issue May 8, 2024 · 2 comments

Comments

@oscarduignan
Copy link

oscarduignan commented May 8, 2024

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

  • Operating system: n/a
  • Browser: n/a
  • Browser version: n/a
  • GOV.UK Prototype Kit version: 13.16.2
@pb-control-dwp
Copy link

@oscarduignan I am having the same issue. I wondered if you have resolved this?

@joelanman
Copy link
Contributor

another workaround for the sass is to add an override:

https://github.com/joelanman/govuk-prototype-kit-prototype/blob/main/package.json#L12-L14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants