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

Setting active: true within opacity-settings variable fails compilation #3345

Closed
greenca6 opened this issue Mar 12, 2020 · 2 comments · Fixed by #3346
Closed

Setting active: true within opacity-settings variable fails compilation #3345

greenca6 opened this issue Mar 12, 2020 · 2 comments · Fixed by #3346

Comments

@greenca6
Copy link

greenca6 commented Mar 12, 2020

Description

If you add active: true to the $opacity-settings variable as such:

$opacity-settings: (
  active: true
);

This will break the build, producing the following error:

ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--15-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined
   ^
      Missing argument $media-prefix
.
    ╷
101 │     @include render-pseudoclass($utility, active, $selector, $property, $value);
    │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
  node_modules\uswds\dist\scss\core\mixins\_utility-builder.scss 101:5   render-pseudoclass()
  node_modules\uswds\dist\scss\core\mixins\_utility-builder.scss 101:5   render-utility()
  node_modules\uswds\dist\scss\core\mixins\_utility-builder.scss 324:15  these-utilities()
  node_modules\uswds\dist\scss\core\mixins\_utility-builder.scss 342:3   render-utilities-in()
  node_modules\uswds\dist\scss\packages\_uswds-utilities.scss 6:1        @import
  node_modules\uswds\dist\scss\uswds.scss 17:9                           @import
  stdin 8:9                                                              root stylesheet

It's likely that this is effecting other settings variables as well (text-align, overflow, etc).

Steps to reproduce the issue

I have a repository set up which mimics the tech stack I have that illustrates this error: https://github.com/greenca6/uswds-tester/tree/active-setting-bug

  1. Clone the repo, get on the active-setting-bug branch
  2. Run npm install
  3. Run npm run start

The error should now be reported on the screen.

Styles are defined in src/styles.scss

@mejiaj
Copy link
Contributor

mejiaj commented Mar 17, 2020

@greenca6, out of curiosity is this:

$opacity-settings: (
  active: true
);

Something you've recently added or have you had this for a while?

If it worked before, do you remember what version? I've tried USWDS 2.2.1 and I still see the error popup. I wonder if it's something that a newer version of SASS has caused.

@greenca6
Copy link
Author

You may very well be right. I first noticed when I upgraded from 2.4.X to 2.5.X - but there were also other upgrades (ones that I thought would've had no impact) I did concurrently, which could've included a sass upgrade somewhere under the hood.

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 a pull request may close this issue.

2 participants