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

Stop warnings/errors from raw SCSS calculations #4983

Closed
wants to merge 1 commit into from

Conversation

mark-roberts-ho
Copy link

There are a few calculations which are not wrapped in calc() and thus generate warnings.

The effect of this change is to stop these errors/warnings being reported in the console

@querkmachine
Copy link
Member

querkmachine commented May 16, 2024

Hi @mark-roberts-ho,

The calculations you've changed here are Sass calculations. They do not need to be wrapped in calc as they are intended to be resolved during the Sass compilation process, rather than on the client.

The warnings are due to the deprecation of using / for division. The transition path for this is to move to the Dart Sass module system, which we cannot do yet as Frontend still supports teams that are using Ruby Sass and LibSass—for which there is no alternative syntax.

Although the examples changed here don't see to have any side effects, there are about 40 more instances of / for division elsewhere in our Sass, not all of which can be converted to using calc. We're planning to move to the Dart Sass module system fairly soon, so our intent is to resolve all of them at once when we're able.

In the meantime, you can silence any warnings you're receiving from govuk-frontend by using the quietDeps option in your Sass build configuration or using the --quiet-deps command line flag.

@36degrees 36degrees closed this May 20, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants