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

&& isn't explained #40

Closed
SomMeri opened this issue Nov 13, 2013 · 7 comments
Closed

&& isn't explained #40

SomMeri opened this issue Nov 13, 2013 · 7 comments

Comments

@SomMeri
Copy link
Member

SomMeri commented Nov 13, 2013

Moved from less.js issue less/less.js#1652 Original description:

Until recently I didn't knew about && as a placeholder for selectors. It seems that this feature isn't documented anywhere.

@seven-phases-max
Copy link
Member

A few ideas for more "advanced &" examples:

// protozoa:
na { ba&&   {._}}
co { &&nut  {._}}
cu { &&mber {._}}
ti { pe&&on, &re { &, re& {._}}}

// don't repeat yourself:
.me {
    &&, & &, && &, & &&, &&&& {._}
}

// robotics:
0, 1 {
    &&&& {._}
}

// ._
._() {D:-}

@jonschlinkert
Copy link
Contributor

lol awesome

@seven-phases-max
Copy link
Member

Btw., what would be a meaningful "&" feature title? There're a few features sub-sections that I'm planning to join into one category but it looks like there's no generally accepted name for this feature.
So far I found: "Appender", "&", "Ampersand", "Self Selector". There's also "Parent Selector" (but there it seems to be dedicated exclusively to "backward & usage": .ie & {}).

@SomMeri
Copy link
Member Author

SomMeri commented Jan 10, 2014

I used appender so far, but I like Parent Selector even more - it is more descriptive. Outer selected could be used to, but I'm not sure how much it is English.

@lukeapage
Copy link
Member

Or even parents selector (note plural)

@seven-phases-max
Copy link
Member

Ok, so I guess I'll stick to "Parent(s) Selector" for the moment. Now I have actually remembered that initially Parent-Selectors.md contained more info about "&" in general but then most of this info was moved into nested.md since almost every example there was the same. Now when contents of nested.md repeat almost everything said in "Overview:Nested Rules" (thus nested.md is not even published in features) I guess I need to move anything about "&" back to Parent-Selectors.md. 👯

@seven-phases-max
Copy link
Member

Closing as "it is now (at least partially).

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