Thanks to visit codestin.com
Credit goes to github.com

Skip to content

USWDS - Bug: Unable to find %usa-prose-p selector when importing uswds-typography in one file and uswds-core in another #4962

@esheehan-gsl

Description

@esheehan-gsl

Describe the bug

I’m trying to configure USWDS inside an @layer rule using the load-css function from sass:meta. When I try to @use "uswds-core" in my own Sass modules so that I can access the tokens for my styles, I get a target selector not found error for %usa-prose-p.

Steps to reproduce the bug

  1. Create a _uswds-theme.scss module per the documentation
  2. Create a _uswds.scss that forwards the theme file and uswds-typography
  3. Create another Sass file with @use "uswds-core" as uswds to define a rule that uses a USWDS token
  4. Create a Sass file that imports both _uswds.scss and your third Sass file using load-css
  5. Build Sass file number 4

Expected Behavior

The output should contain the styles from uswds-typography as well as whatever styles you added to your Sass file in step 3.

Related code

I have a demo of the bug here: https://github.com/esheehan-gsl/uswds-layer-test

Screenshots

No response

System setup

No response

Additional context

No response

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions