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

Should be an error when @debug, @warn, and @error are nested beneath properties #1653

Closed
andrew-skybound opened this issue Oct 28, 2015 · 4 comments

Comments

@andrew-skybound
Copy link

Input:

a {
    margin: {
        @debug test;
        left: 0px;
    }
}

Ruby SASS Output (3.4.19)

Error: Illegal nesting: Only properties may be nested beneath properties.

Libsass Output (3.2.5)

a {
  margin-left: 0px; }

(Console)

DEBUG: test

Same issue with @warn and @error when they are nested beneath properties.

@xzyfer
Copy link
Contributor

xzyfer commented Oct 28, 2015

Thanks for the report @andrew-skybound

saper added a commit to saper/sass-spec that referenced this issue Nov 14, 2015
Nested @error, @warn, @debug directives
are illegal:

a {
    margin: {
        @debug test;
        left: 0px;
    }
}

sass/libsass#1653
@xzyfer
Copy link
Contributor

xzyfer commented Dec 1, 2015

Spec added sass/sass-spec#618

@andrew-skybound
Copy link
Author

Note that when @debug, @warn, or @error appear in a mixin which is included in a nested property scope, no error should be raised (the rules work as they normally would).

@mixin font-properties() {
    weight: bold;
    @warn "Warning";
}

a {
    font: {
        @include font-properties();
    }
}

Output:

WARNING: Warning
         on line 3 of test.scss, in `font-properties'
         from line 8 of test.scss

xzyfer added a commit to xzyfer/sass-spec that referenced this issue Dec 27, 2015
Made the tests more thorough based in added information in
sass/libsass#1653 (comment).

Also moved the specs to a more appropriate location.
@xzyfer
Copy link
Contributor

xzyfer commented Dec 27, 2015

Updated specs sass/sass-spec#645

@xzyfer xzyfer added this to the 3.4 milestone Dec 27, 2015
@mgreter mgreter modified the milestones: 3.3.3, 3.4 Jan 11, 2016
@mgreter mgreter self-assigned this Jan 11, 2016
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants