Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Including a @mixin when outside of selector still outputs properties #1732

Closed
ezekg opened this issue Nov 13, 2015 · 5 comments
Closed

Including a @mixin when outside of selector still outputs properties #1732

ezekg opened this issue Nov 13, 2015 · 5 comments

Comments

@ezekg
Copy link

ezekg commented Nov 13, 2015

As mentioned in ezekg/flint#40 (comment) and similar to #1585.

Reproducable test case:

@mixin a {
  b: c;
}

@include a();

Compiling with Ruby Sass results in:

Error: Properties are only allowed within rules, directives, mixin includes, or other properties.

Cmd: sass test.scss

Compiling with Libsass results in:

b: c;

Cmd: sassc test.scss

@xzyfer xzyfer added this to the 3.3.3 milestone Nov 13, 2015
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Nov 13, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Nov 13, 2015

Thanks for the report @ezekg.

@xzyfer
Copy link
Contributor

xzyfer commented Nov 13, 2015

Spec added sass/sass-spec#613

@mgreter
Copy link
Contributor

mgreter commented Jan 11, 2016

This is a bit more complicated since the check cannot be done in parser, since the following is valid:

@mixin a {
  b: c;
}
foo {
  @include a();
}

So we need to do this check after the mixin is expanded.

@mgreter mgreter modified the milestones: 3.3.4, 3.3.3 Jan 11, 2016
@mgreter
Copy link
Contributor

mgreter commented Feb 23, 2016

WIP to fix this in #1900

@xzyfer xzyfer modified the milestones: 3.3.4, 3.3.5, 3.4 Mar 17, 2016
@xzyfer
Copy link
Contributor

xzyfer commented Mar 23, 2016

Reassiging this to 3.4. This doesn't prevent people to from migrating to LibSass I suspect browsers will simply ignore these erroneous properties.

@mgreter mgreter self-assigned this Apr 30, 2016
@mgreter mgreter modified the milestones: 3.3.7, 3.4 Apr 30, 2016
@mgreter mgreter removed their assignment Apr 30, 2016
xzyfer added a commit to xzyfer/libsass that referenced this issue May 1, 2016
This is introduces a vastly reduced `CheckNesting` visitor from Ruby
Sass as discussed in sass#2061. Doing this properly will require some
small changes to the parser, and probably eval, which currently try
to do some nesting checking of their own.

This is just first step to properly introducing the proper nesting
checking.

Closes sass#2061
Fixes sass#1732
xzyfer added a commit to xzyfer/libsass that referenced this issue May 1, 2016
This is introduces a vastly reduced `CheckNesting` visitor from Ruby
Sass as discussed in sass#2061. Doing this properly will require some
small changes to the parser, and probably eval, which currently try
to do some nesting checking of their own.

This is just first step to properly introducing the proper nesting
checking.

Closes sass#2061
Fixes sass#1732
xzyfer added a commit to xzyfer/libsass that referenced this issue May 1, 2016
This is introduces a vastly reduced `CheckNesting` visitor from Ruby
Sass as discussed in sass#2061. Doing this properly will require some
small changes to the parser, and probably eval, which currently try
to do some nesting checking of their own.

This is just first step to properly introducing the proper nesting
checking.

Closes sass#2061
Fixes sass#1732
xzyfer added a commit to xzyfer/sass-spec that referenced this issue May 2, 2016
xzyfer added a commit to xzyfer/libsass that referenced this issue May 2, 2016
This is introduces a vastly reduced `CheckNesting` visitor from Ruby
Sass as discussed in sass#2061. Doing this properly will require some
small changes to the parser, and probably eval, which currently try
to do some nesting checking of their own.

This is just first step to properly introducing the proper nesting
checking.

Closes sass#2061
Fixes sass#1732
xzyfer added a commit to xzyfer/libsass that referenced this issue May 2, 2016
This is introduces a vastly reduced `CheckNesting` visitor from Ruby
Sass as discussed in sass#2061. Doing this properly will require some
small changes to the parser, and probably eval, which currently try
to do some nesting checking of their own.

This is just first step to properly introducing the proper nesting
checking.

Closes sass#2061
Fixes sass#1732
xzyfer added a commit to xzyfer/libsass that referenced this issue May 2, 2016
This is introduces a vastly reduced `CheckNesting` visitor from Ruby
Sass as discussed in sass#2061. Doing this properly will require some
small changes to the parser, and probably eval, which currently try
to do some nesting checking of their own.

This is just first step to properly introducing the proper nesting
checking.

Closes sass#2061
Fixes sass#1732
xzyfer added a commit to xzyfer/sass-spec that referenced this issue May 2, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants