mickleroy / aem-sass-compiler

Enable Sass support for AEM
Other
49 stars 18 forks source link

Parent selector not working #15

Closed sb-pk closed 5 years ago

sb-pk commented 5 years ago

Hi @mickleroy ,

When we use parent selector (<), its not compiling back to css. throwing exception.

Line of code used- p < .small { margin: 0; } Exception-23.03.2019 22:24:34.719 ERROR [0:0:0:0:0:0:0:1 [1553340274635] GET /etc/designs/test/clientlib-test.css HTTP/1.1] com.github.mickleroy.aem.sass.impl.SassCompilerImpl Failed to compile Sass /apps/test/clientlib-site/css/main.scss: Error: Invalid CSS after "}": expected 1 selector or at-rule, was "p < .small { margin" on line 117 of ../../../../../../../apps/test/clientlib-site/css/_base.scss

} -^

mickleroy commented 5 years ago

Hi @SBPrakash, can you please link me to documentation about the parent selector in Sass? I can't seem to find any reference to it..

sb-pk commented 5 years ago

@mickleroy Here it is https://stackoverflow.com/questions/1014861/is-there-a-css-parent-selector https://css-tricks.com/parent-selectors-in-css/

mickleroy commented 5 years ago

Thanks. The article is pretty clear - the parent selector isn't implemented in CSS3 or Sass:

Let's be clear here, just in case someone is finding this from a search engine: there are no parent selectors in CSS, not even in CSS3.