SCSS Breakpoints !global Deprecation

Hi,

I’ve just seen this warning when building my site:

DEPRECATION WARNING on line 7 of /XXXX//themes/alpha-church/assets/scss/libs/_breakpoints.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$breakpoints: null` at the top level.

The code raising the warning is found here (I maintain this theme)

Can someone please point me to documentation to help me understand what needs to be done to maintain forward compatibility?

This is a warning about SCSS and not Hugo.

I think that you will have a better chance to find an answer by asking in a forum about SCSS.

Thanks @alexandros,

I asked here since the warning is given by running hugo server. What library does hugo extended use for compiling SCSS?

This is the Go LibSass repo that is used by Hugo.

1 Like

The error comes from the sass library

The !global flag may only be used to set a variable that has already been declared at the top level of a file. It may not be used to declare a new variable.

Check out

2 Likes

Thanks @zzo. Those docs were very helpful, and I’ve pushed an update to the theme which seems to work—at the very least, it resulted in no changes to the compiled CSS and no further warning messages.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.