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

Segmentation fault when nesting @media in sub-properties #2148

Closed
frantic1048 opened this issue Aug 15, 2016 · 1 comment
Closed

Segmentation fault when nesting @media in sub-properties #2148

frantic1048 opened this issue Aug 15, 2016 · 1 comment

Comments

@frantic1048
Copy link

frantic1048 commented Aug 15, 2016

I know this is not legal syntax for SCSS, but I think throwing a sensible error is better than one line segfault...

input.scss

body {
  margin: {
    @media (min-width: 30em) { top: 1em; }
  }
}

libsass 3.3.6

Segmentation fault (core dumped)

ruby sass 3.4.22

Error: Illegal nesting: Only properties may be nested beneath properties.
        on line 3 of src/style.scss
  Use --trace for backtrace.

version info:

$ node-sass --version
node-sass       3.8.0   (Wrapper)       [JavaScript]
libsass         3.3.6   (Sass Compiler) [C/C++]
$node -v
v6.3.1
$uname -sr
Linux 4.6.5-1-zen
@mgreter
Copy link
Contributor

mgreter commented Aug 16, 2016

Thanks for the report. This is already fixed on master.

$ psass sass.scss
Error: Illegal nesting: Only properties may be nested beneath properties.
        on line 3 of sass.scss
>>     @media (min-width: 30em) { top: 1em; }
   ----^

$ psass -v
psass 0.4.0 (perl sass/scss compiler)
  libsass: 3.3.6-87-gf96ec465
  sass2scss: 1.0.6

@mgreter mgreter closed this as completed Aug 16, 2016
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