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

Pre-declare variables before setting global. #2308

Merged
merged 1 commit into from
May 31, 2021
Merged

Pre-declare variables before setting global. #2308

merged 1 commit into from
May 31, 2021

Conversation

dj2
Copy link
Contributor

@dj2 dj2 commented May 31, 2021

Summary | Résumé

This PR fixes a warning which appears as the declaration and setting of
a variable !global is deprecated. This PR pre-declares the variable at
the top of the file allowing it to be made global later.

Issue #2052

This PR fixes a warning which appears as the declaration and setting of
a variable `!global` is deprecated. This PR pre-declares the variable at
the top of the file allowing it to be made global later.
@dj2 dj2 requested a review from brdunfield May 31, 2021 18:53
@dj2 dj2 self-assigned this May 31, 2021
@maxneuvians maxneuvians temporarily deployed to digital-cana-colour-war-luyvf2 May 31, 2021 18:54 Inactive
@brdunfield
Copy link
Contributor

Which warning does this fix? The only warning I see on my local build is about .File.Dir

@dj2
Copy link
Contributor Author

dj2 commented May 31, 2021

Sorry, this is with newer Hugo. I'm trying to fix things that don't cause issues with old hugo.

DEPRECATION WARNING on line 1 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$primary-color: null` at the top level.

DEPRECATION WARNING on line 6 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$engagement-color: null` at the top level.

DEPRECATION WARNING on line 7 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$organizing-color: null` at the top level.

DEPRECATION WARNING on line 8 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$talent-color: null` at the top level.

DEPRECATION WARNING on line 9 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$design-color: null` at the top level.

DEPRECATION WARNING on line 10 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$foundations-color: null` at the top level.

DEPRECATION WARNING on line 11 of /Users/dj2/Development/cds/digital-canada-ca/assets/sass/engagement/_settings.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$yourthoughts-color: null` at the top level.

Copy link
Contributor

@brdunfield brdunfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I was wondering if it was an older Hugo thing.
I looked in the current Sass docs and saw the rule about this - LGTM!

@dj2 dj2 merged commit 0f1b45b into master May 31, 2021
@dj2 dj2 deleted the colour_warnings branch May 31, 2021 19:15
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.

3 participants