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

Selector groups can not be extended #950

Closed
ghost opened this issue Mar 16, 2015 · 8 comments · Fixed by #1009
Closed

Selector groups can not be extended #950

ghost opened this issue Mar 16, 2015 · 8 comments · Fixed by #1009

Comments

@ghost
Copy link

ghost commented Mar 16, 2015

I'm not able to compile something like:

.selector1{ ... }
.selector2{ ... }

.selector3{ @extend .selector1, .selector2; }

According to sass-lang ref-doc:

Multiple extends can also be written using a comma-separated list of selectors. For example, @extend .error, .attention is the same as @extend .error; @extend .attention.

A couple of months ago worked fine and, currently, it compiles well on codepen.

Am I missing something ?

@mgreter
Copy link
Contributor

mgreter commented Mar 16, 2015

This is the selector groups may not be extended error, which is simply a missing feature. I renamed the title since you didn't include this in your report, so the search can find this issue. @xzyfer feel free to assign a milestone, since I think you have more expertise in this area!

@ghost
Copy link
Author

ghost commented Mar 17, 2015

Hi @mgreter,
I can't understand why, a couple of months ago, I was able to compile it.

I wrote an entire fluid grid framework with this feature and now I'm unable to still work on it.

Amazingly weird.

@ghost
Copy link
Author

ghost commented Mar 17, 2015

You can close the issue: feature's implemented and my project is running again.
Why ? I really don't know.

@ghost ghost closed this as completed Mar 17, 2015
@xzyfer xzyfer reopened this Mar 17, 2015
@xzyfer
Copy link
Contributor

xzyfer commented Mar 17, 2015

@archgrove thank you for this report. Let me clear a couple things up.

it compiles well on codepen

Codepen uses Ruby Sass not Libsass which is why your code works there.

I can't understand why, a couple of months ago, I was able to compile it.

It sounds you were using Ruby Sass, not Libsass. Libsass is not yet at feature parity.

You can close the issue

I've reopened this issue because as @mgreter pointed out this is a missing feature.
We will keep this issue open until it has been added in Libsass.

@xzyfer xzyfer changed the title [ @extend ] Can't extend nested selectors Can't extend selector groups Mar 17, 2015
@xzyfer xzyfer changed the title Can't extend selector groups Selector groups can not be extended Mar 17, 2015
@xzyfer xzyfer added this to the 3.3 milestone Mar 17, 2015
@ghost
Copy link
Author

ghost commented Mar 17, 2015

OMG. What a stupid developer am I ?
I was compiling under mac osx and I installed sass by gem.
This means ruby-sass and that I'm so sorry for opening this issue.

@HamptonMakes
Copy link
Member

No big deal! It's fine!

@HamptonMakes
Copy link
Member

Sorry, just realized it was requested to stay open above. @xzyfer I'll stop mucking about. ;)

@mgreter mgreter modified the milestones: 3.2.1, 3.3 Mar 28, 2015
mgreter added a commit to mgreter/libsass that referenced this issue Mar 30, 2015
Code was actually working. Not sure why we had this
check if the first place (was added with first commit
when expand.cpp was introduced in the project). So I
just removed the check with the error and it worked!

Fixes sass#950
@mgreter mgreter modified the milestones: 3.2, 3.2.1 Mar 30, 2015
@mgreter mgreter self-assigned this Mar 30, 2015
@mgreter
Copy link
Contributor

mgreter commented Mar 30, 2015

Actually this already works, once we remove the check that throws the error. Made a blame check and it was in place since the expand source file was introduced. So I just removed it, added a loop around the existing code and it does the right thing at least in this case. So I would like to ship this with 3.2.0. I honestly have no idea how well the feature is supported, but I guess we'll see 😄

mgreter added a commit to mgreter/libsass that referenced this issue Mar 30, 2015
Code was actually working. Not sure why we had this
check if the first place (was added with first commit
when expand.cpp was introduced in the project). So I
just removed the check with the error and it worked!

Fixes sass#950
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants