-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Suggestion: wrap compound "&" #{&}
with interpolation to avoid invalid sourcemaps on libsass
#1948
Comments
#{&}
selectors on sass to avoid invalid sourcemaps on libsass#{&}
with interpolation to avoid invalid sourcemaps on libsass
Thanks for filing this issue! And thanks for including links to relevant issues/code and a sample repo - it's very helpful 😄 This may be related to #720. I see no problem with your workaround. Feel free to send us a PR to fix it! 😀 |
Hi @acdvorak. Thanks for getting back to me. I definitely believe it's related to #720. I'm sorry I didn't notice it. I'm just not sure if my PR will fix it as well, but I'm happy to investigate further. I've sent the PR #1949 that fix at least my issue. In case it doesn't work for #720, we might need to interpolate more |
I just had the same issue on another project. Any owner/contributor could please code review the PR #1949 ? @acdvorak @traviskaufman @acdvorak @kfranqueiro Cheers! |
Closing since |
Bugs
Follow the template below to ensure the quickest and most accurate response to your issue.
What MDC-Web Version are you using?
What OS are you using?
What are the steps to reproduce the bug?
There's a compound selector
&--theme-dark
in themdc-theme-dark
mixin that breaks sourcemaps within libsass:As a workaround, if we wrap the compound selector with interpolation, the sourcemap is generated successfully.
What is the expected behavior?
If we wrap the selector with
#{&}
we avoid the libsass issue.What is the actual behavior?
As an example, if we use webpack and run node-sass with sourcemaps enable, libsass breaks the build.
Error:
In my repo, if you clone, install the npm packages and run
npm run start
. You'll be able to reproduce the error.To fix it, I've wrapped the compound & inside the
@mixin mdc-theme-dark
:PS: I know this is not related to mdc, but it would be nice to avoid this issue while the libsass team find a way to fix it. It seems pretty hard to fix it there.
The text was updated successfully, but these errors were encountered: