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] SASS Can not comple #328

Open
nowpc2 opened this issue Jan 13, 2022 · 2 comments
Open

[Bug] SASS Can not comple #328

nowpc2 opened this issue Jan 13, 2022 · 2 comments

Comments

@nowpc2
Copy link

nowpc2 commented Jan 13, 2022

Version

3.0.2

Reproduction link

n/a

Operating System

Windows

Device

n/a

Browser & Version

n/a

Steps to reproduce

We are trying to compile the SASS and having issues.

C:\ProgramData\chocolatey\bin\sass.exe --style compressed --update staff.scss:F:\dev\assets\css\staff.min.css

What is expected?

Compiled CSS

What is actually happening?

SASS v1.48.0 on Windows

Error: Top-level selectors may not contain the parent selector "&".

15 │ &.bg-gradient-faded-#{$prop}-vertical{
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

..\mdp\3.0.2\scss\material-dashboard_gradients.scss 15:3 @import
..\mdp\3.0.2\scss\material-dashboard\theme.scss 43:9 @import
..\mdp\3.0.2\scss\material-dashboard\theme-pro.scss 20:9 @import
staff.scss 16:9


Solution

Additional comments

If this issue is because of our version of SASS, please advise which would work.

@nowpc2
Copy link
Author

nowpc2 commented Jan 18, 2022

A quick update, using node-sass instead of dart sass seems to fix this issue for now.

@groovemen
Copy link
Contributor

Hello @nowpc2,

Thank you for using our products, until the next product update we'll ask you to make the following changes:

  • have to erase the '&' so it will look like this .bg-gradient-faded instead of &.bg-gradient-faded.
@each $prop, $value in $theme-colors {
  .bg-gradient-faded-#{$prop}-vertical{
    background-image: radial-gradient(200px circle at 50% 70%, rgba($value, .3) 0, $value 100%);
  }
}

Hope that information helps you. Please let us know if we can help you with anything else.

All the best,
Stefan

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

No branches or pull requests

2 participants