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

[Bug]: Not Playing Well With Sass @extend Syntax #1156

Open
1 task done
fweth opened this issue Sep 28, 2023 · 0 comments
Open
1 task done

[Bug]: Not Playing Well With Sass @extend Syntax #1156

fweth opened this issue Sep 28, 2023 · 0 comments
Labels

Comments

@fweth
Copy link

fweth commented Sep 28, 2023

Describe the bug

Not sure if this is in the responsibility of PurgeCSS, but when I have this SCSS file:

@import "bootstrap/scss/bootstrap";
/* purgecss start ignore */
.rte {
  a {
    @extend .text-decoration-underline, .link-offset-3;
  }
  blockquote {
    @extend .blockquote, .ms-4,.mt-5, .fs-4;
  }
}
/* purgecss end ignore */

then it doesn't create classes for a or blockquote if it can't find the classes inside the @extend clause in the wild. So I don't know how the pre-processed CSS handed from Sass to PurgeCSS exactly looks like and if PurgeCSS even has a change to fix this, but it's still not the behaviour I expected.

To Reproduce

Compile the SCSS code from with Sass and PurgeCSS, e.g. via Vite.js.

Expected Behavior

PurgeCSS should create styles for .rte a and .rte blockquote even when it doesn't encounter the Bootstrap classes the files it looks through.

Environment

Node 18

Add any other context about the problem here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@fweth fweth added the bug label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant