#62142 closed task (blessed) (fixed)
Sass Deprecation warnings during build process.
Reported by: | peterwilsoncc | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | css | Cc: |
Description
Sass has updated it's colour functions and they are showing deprecation warnings (ie nothing fatal) during the build process.
Various sass files will need to be updated in WordPress-Develop to resolve these.
- Run
nvm use; npm i
- Run
npm run grunt clean:qunit; npm run build:dev
- Observe the deprecation warnings
An example follows but there are several more:
Deprecation Warning: lighten() is deprecated. Suggestions: color.scale($color, $lightness: 15.9375%) color.adjust($color, $lightness: 7%) More info: https://sass-lang.com/d/color-functions ╷ 58 │ $adminbar-input-background: lighten( $menu-background, 7% ) !default; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ src/wp-admin/css/colors/_variables.scss 58:29 @import src/wp-admin/css/colors/_admin.scss 2:9 @import src/wp-admin/css/colors/blue/colors.scss 14:9 root stylesheet
Change History (5)
This ticket was mentioned in PR #7511 on WordPress/wordpress-develop by veryard.
6 days ago
#2
- Keywords has-patch added; needs-patch removed
Went through the SCSS files and resolved deprecated warnings for older color functions. Happy to fix anything I may have missed.
https://sass-lang.com/documentation/breaking-changes/color-functions/
Trac ticket: https://core.trac.wordpress.org/ticket/62142
Note: See
TracTickets for help on using
tickets.
This is a recent deprecation from latest version of sass package.
color.adjust($color, $lightness: 7%)
. This also includes other methods likedarken()
,desaturate()
etc.https://sass-lang.com/documentation/breaking-changes/legacy-js-api/#silencing-warnings
We can do this inside Gruntfile.js