ritwickdey / vscode-live-sass-compiler

Compile Sass or Scss file to CSS at realtime with live browser reload feature.
https://ritwickdey.github.io/vscode-live-sass-compiler/
MIT License
657 stars 168 forks source link

Building scss file with .dummy [disabled] fails #516

Closed responsivecodex closed 3 years ago

responsivecodex commented 3 years ago

Hi! When my file .scss has a rule similar to this: .area-color-3 [attr="disabled"]{ color: gray; } or .area-color-3 [disabled]{ color: gray; }

The extension buils a css with this:

.area-color-3 [attribute=disabled]{ color: gray; }

And this not work because don't contains quotes.

Could you help me?

glenn2223 commented 3 years ago

I just tried and it works for me. (Note: I've tested with my updated fork - see the message at the bottom)

Please be aware that quotes aren't actually necessary for something like disabled to work.

Should there be a space between .area-color-3 and [disabled]? Or, should it be .area-color-3[disabled]?

The first is going to apply the style to anything with a disabled attribute inside area-color-3. But, the latter will apply the style to area-color-3 when it has a disabled attribute.


This extension is no longer maintained - see #486, this will show you that I have a fork that I'm actively maintaining.

After reading it, please close this issue so my own can stay top of the list. Thanks

glenn2223 commented 3 years ago

For reference:

Input SCSS

.area-color-3 [attr="disabled"] {
    color: gray;
}

.area-color-3 [disabled] {
    color: gray;
}

Output CSS

.area-color-3 [attr=disabled] {
  color: gray;
}

.area-color-3 [disabled] {
  color: gray;
}
responsivecodex commented 3 years ago

Thanks a lot. I close it.