You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sebastiannm , it not just happens for :host but for any style written in *.sass file. The error clearly states that it expects scss code with { and not sass code.
Reacted by Yogesh Surendran, Alejandro Pérez Martín, Daniel Gonzalez, Huynh Trung Hieu, GerbetMikhaël, Viper, Egor Stronhin, Glenn Vlekke, beORIGINAL, Barry Melton and 4 more
Reacted by GerbetMikhaël, Viper, beORIGINAL, rachid O and tango
This library (https://github.com/mgreter/sass2scss) is what is used inside libsasswhich is used in node-sass to handle the old sass syntax. With the upgrade, the identification of sass properties seems to have been improved. As a result :host is interpreted as a sass property due to the lack of special handling for the host selector (there are checks for other pseudo selectors).
Activity
beeman commentedon Jan 14, 2017
@sebastiannm can you please paste the component?
sebastiannm commentedon Jan 14, 2017
it happens too with a new app that I just created from scratch using: ng new testapp --style=sass
this is the boilerplate component...
CarreraPHP commentedon Jan 14, 2017
@sebastiannm , it not just happens for
:hostbut for any style written in*.sassfile. The error clearly states that it expectsscsscode with{and notsasscode.above code if changed like below will work fine
However, by selecting
sassas the style extension we should be able to write style code in ruby-like style.beeman commentedon Jan 14, 2017
I can confirm that I get this error message to on this version of angular-cli when starting it with
--style=sass.However, if I create the app like this it works:
ng new testapp-scss --style=scssbeeman commentedon Jan 14, 2017
It looks like you should do it like this:
Source: sass/libsass#1990
sebastiannm commentedon Jan 14, 2017
@beeman yeah that solves the issue. This error didn't happen in beta v24
beeman commentedon Jan 14, 2017
@sebastiannm please note that in this version there was an upgrade of node-sass (from 3.x to 4.x), that might be related. More info here #3860
It might be related to that causes this.
clydin commentedon Jan 14, 2017
This library (https://github.com/mgreter/sass2scss) is what is used inside
libsasswhich is used innode-sassto handle the old sass syntax. With the upgrade, the identification of sass properties seems to have been improved. As a result:hostis interpreted as a sass property due to the lack of special handling for the host selector (there are checks for other pseudo selectors).sass2scssshould probably support:hostdirectly.filipesilva commentedon Jan 14, 2017
Great job tracking this down @beeman and @clydin! I'm closing as it seems to be working as intended, albeit unfortunately so.
x-yuri commentedon Sep 1, 2018
It has to do with this particular commit:
1.sass:It was integrated into
libsass-3.4.0-RC1, andnode-sass-3.14.0-0.Related issue.
angular-automatic-lock-bot commentedon Sep 8, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.