From 96ef26a9ff95bd35fff072b30fcb4563e9a10e84 Mon Sep 17 00:00:00 2001 From: Luke Page Date: Fri, 24 Aug 2012 06:45:28 +0100 Subject: [PATCH] Revert commit mistake --- lib/less/parser.js | 23 ++--------------------- test/css/selectors.css | 9 --------- test/less/selectors.less | 13 ------------- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index 2bc229c6..92a79bdd 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -1001,29 +1001,10 @@ less.Parser = function Parser(env) { selector: function () { var sel, e, elements = [], c, match; - if (peek(/^&?\(/)) { - // variable selectors: - // allow & before a selector to allow variable selectors - // to be at the same level, e.g. - // .a { - // &(~".b") { - // - // Ideally this would be part of the element function.. this would allow - // (@a).b(@c) - // however this syntax conflicts with the supported syntax - // :nth-child(@a) - // vs - // .a:hover(@a) - - e = $('&'); - $('('); - if (e) { - elements.push(new(tree.Element)('', e, i)); - } + if ($('(')) { sel = $(this.entity); expect(')'); - elements.push(new(tree.Element)('', sel, i)); - return new(tree.Selector)(elements); + return new(tree.Selector)([new(tree.Element)('', sel, i)]); } while (e = $(this.element)) { diff --git a/test/css/selectors.css b/test/css/selectors.css index a9e165fd..720b88c3 100644 --- a/test/css/selectors.css +++ b/test/css/selectors.css @@ -113,12 +113,3 @@ p a span { .other::bnord { color: #ff0000; } -.a .b { - color: red; -} -.a.c { - color: black; -} -.a :nth-child(3) { - color: purple; -} diff --git a/test/less/selectors.less b/test/less/selectors.less index 7d18b391..23be9fbd 100644 --- a/test/less/selectors.less +++ b/test/less/selectors.less @@ -107,16 +107,3 @@ a { ::bnord {color: red } &::bnord {color: red } } - -.a { - (~".b") { - color: red; - } - &(~".c") { - color: black; - } - @d: 3; - :nth-child(@d) { - color: purple; - } -}