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

Test uswds-compile sassOptions #180

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mdmower-csnw
Copy link

@mdmower-csnw mdmower-csnw commented Feb 6, 2025

This is a testing pull request for uswds/uswds-compile#145 . It is not intended to be merged. Once testing is complete, this pull request can be closed.

uswds/uswds-compile#145 adds support for configuring sass-embedded via settings.compile.sassOptions. It also deprecates but maintains compatibility for settings.compile.sassDeprecationWarnings. Sample code changes are applied in this PR to demonstrate use of this new option.

Suggested tests to get started

  1. Custom loadPaths and unminified CSS
    1. Use this PR as-is
    • Compilation should succeed, SASS deprecation warnings should be suppressed, there should be italicized text on the home page, and the output _site/assets/css/styles.css should not be minified. If the watch script is running, editing _custom.scss should result in SASS recompilation.
  2. Undefined options
    1. Update src/_styles/_uswds-theme-custom-styles.scss: replace @use "custom"; with @use "../custom/custom";.
    2. Update gulpfile.js: comment out assignment of uswds.settings.compile.sassOptions.
    • Compilation should succeed, SASS deprecation warnings should be suppressed, there should be italicized text on the home page, and the output _site/assets/css/styles.css should be minified.
  3. Deprecated option
    1. Restore files to match this PR
    2. Update gulpfile.js: add settings.compile.sassDeprecationWarnings = true;
    • Compilation should succeed, SASS deprecation warnings should not be suppressed, there should be italicized text on the home page, and the output _site/assets/css/styles.css should not be minified.

From here, feel free to play around with additional options.

Bump uswds-compile to latest commit in branch.
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.

1 participant