Visitar URL original
USWDS: fix deprecation warnings for global functions by ethangardner · Pull Request #6746 · uswds/uswds · GitHub
Skip to content

USWDS: fix deprecation warnings for global functions - #6746

Merged
ethangardner merged 1 commit into
developfrom
task/6216-sass-deprecation
Jul 6, 2026
Merged

ethangardner merged 1 commit into
developfrom
task/6216-sass-deprecation

Conversation

@ethangardner

@ethangardner ethangardner commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes Sass deprecation warnings for length(), unquote(), and unit() by replacing global built-in function calls with their namespaced module equivalents.

Breaking change

This is not a breaking change

Related issue

Closes #6216

Problem statment

Sass is deprecating global built in functions like length, unquote, and unit and moving them to namespaced equivalents. Output of a sass build shows warnings in the terminal and has caused some confusion with downstream consumers.

Solution

Replaced deprecated global function calls with their modern equivalent to fix the root cause of the warnings and prepare for future updates.

Changes

  • rem-to-user-em.scss: Replace unit() with math.unit()
  • add-bar.scss: Remove unnecessary unquote() calls on interpolated string properties (interpolation already produces unquoted output)
  • layout-grid.scss: Replace unquote() with string.unquote(), replace length() with list.length(), add @use "sass:string"
  • _grid-container.scss: Replace length() with list.length()

Testing and review

Run npm run test:sass to confirm tests pass. Run npm run build to verify that the only deprecation warnings remaining are releated to the if which will be updated in a subsequent PR.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

✅ All commits on this PR have a verified signature. Thanks!

@ethangardner
ethangardner marked this pull request as ready for review July 6, 2026 16:43
@ethangardner ethangardner changed the title fix deprecation warnings for length and unquote USWDS: fix deprecation warnings for global functions Jul 6, 2026

@jonathanbobel jonathanbobel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this. 🚀

@ethangardner
ethangardner merged commit 442ccc5 into develop Jul 6, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Fed Final Review in USWDS Core Project Data Jul 6, 2026
@chandracarney chandracarney moved this from Fed Final Review to Done in USWDS Core Project Data Jul 20, 2026
@chandracarney
chandracarney deleted the task/6216-sass-deprecation branch July 20, 2026 19:33
@annepetersen annepetersen added this to the uswds 3.14.0 - Aug 2026 milestone Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

USWDS - Sass 3.0.0: @import and global built-in functions deprecation

4 participants