diff --git a/doc-src/SASS_CHANGELOG.md b/doc-src/SASS_CHANGELOG.md index 850ab24c..e23fab51 100644 --- a/doc-src/SASS_CHANGELOG.md +++ b/doc-src/SASS_CHANGELOG.md @@ -664,6 +664,13 @@ and the hex representation (shortened to the three-letter version if possible). and `tealbang(12)` now renders as `tealbang(12)` rather than `teal bang(12)`. +## 2.2.24 (Unreleased) + +* Parent references -- the `&` character -- + may only be placed at the beginning of simple selector sequences in Sass 3. + Placing them elsewhere is deprecated in 2.2.24 and will print a warning. + For example, `foo &.bar` is allowed, but `foo .bar&` is not. + ## 2.2.23 [Tagged on GitHub](http://github.com/nex3/haml/commit/2.2.23). diff --git a/lib/sass/tree/rule_node.rb b/lib/sass/tree/rule_node.rb index 2dc7c87a..ca7c57c7 100644 --- a/lib/sass/tree/rule_node.rb +++ b/lib/sass/tree/rule_node.rb @@ -289,7 +289,15 @@ module Sass::Tree while scanner.rest? rules.last << scanner.scan(/[^",&]*/) case scanner.scan(/./) - when '&'; rules.last << :parent + when '&' + warn <