Make WordPress Core

Opened 6 months ago

Closed 3 months ago

Last modified 3 months ago

#62323 closed defect (bug) (fixed)

Sass Deprecation warnings during build process with v 1.80.x

Reported by: mattyrob's profile MattyRob Owned by: desrosj's profile desrosj
Milestone: 6.8 Priority: normal
Severity: normal Version: 6.7
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

Follow up to #62142

SASS has deprecated global functions and also the @import rule, see here:

https://sass-lang.com/documentation/breaking-changes/import/
https://sass-lang.com/documentation/at-rules/import/

Fixes for this have been created in a PR for ClassicPress and we are sharing this back should you wish to consider the same solution.

Patch files for the 2 commits are attached and the original PR is here:

https://github.com/ClassicPress/ClassicPress/pull/1621

Attachments (2)

0001-Migrate-from-import-to-use-and-forward.patch (34.2 KB) - added by MattyRob 6 months ago.
0001-Prepare-for-SASS-2.0.0-and-3.0.0.patch (4.6 KB) - added by MattyRob 6 months ago.

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
6 months ago

  • Milestone changed from Awaiting Review to 6.8

#2 @desrosj
6 months ago

  • Keywords has-patch added
  • Owner set to desrosj
  • Status changed from new to reviewing

#4 @desrosj
3 months ago

  • Keywords commit added

Thanks for this, @MattyRob!

The patch did not apply correctly, but I went ahead and created the attached PR to test it out.
DEPRECATION WARNING [user-authored]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

There are still several of these warnings, but I think this is due to grunt-sass not yet accounting for the changes upstream. There is an open issue and even a fork with the fix published as grunt-sass-modern.

I double checked the built files, and no unexpected CSS changes resulted. Will confirm after committing.

#5 @desrosj
3 months ago

  • Component changed from Build/Test Tools to Administration

#6 @desrosj
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 59656:

Administration: Modernize admin color scheme SASS files.

This updates the admin color scheme .sass files to address some deprecated notices caused by upstream changes.

  • string and colors are no longer globally available functions.
  • @import is deprecated in favor of @use.

There are still a few notices that are output, however this will require an update to the grunt-sass package to resolve.

Props MattyRob.
Fixes #62323.

#8 @desrosj
3 months ago

Confirmed there are no changes to .css files after [59656]: https://build.trac.wordpress.org/changeset/58999.

Note: See TracTickets for help on using tickets.