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

Proposal: arbitrary &-inheritance. #578

Closed
egasimus opened this issue Nov 26, 2012 · 3 comments
Closed

Proposal: arbitrary &-inheritance. #578

egasimus opened this issue Nov 26, 2012 · 3 comments

Comments

@egasimus
Copy link

One of the main reasons I use a preprocessor is rule nesting - I really fell in love with that feature! However, it easily introduces unnecessary selector specificity, which can be a reason to entirely abandon one of the major conveniences of using a CSS preprocessor - if you care about writing optimized code, that is.

I propose extending the & operator's behavior to work at any point in the selector string. This way,

.lol {
    &-wut {
        ...
    }
}

would compile to:

.lol-wut {
    ...
}

And you wouldn't have to do this:

.lol {
}
    .lol-wut {
    }

Any opinions?

@Inkdpixels
Copy link

A possible usecase for this feature would be plugin / extension namespaces in templates.

@Anahkiasen
Copy link

This will probably be taken care of by the refactor of the & selector. At least I think (hope) so.

@replete replete mentioned this issue Nov 26, 2012
@nex3
Copy link
Contributor

nex3 commented Nov 27, 2012

Subset of #286.

@nex3 nex3 closed this as completed Nov 27, 2012
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

4 participants