blakeembrey / free-style

Make CSS easier and more maintainable by using JavaScript
MIT License
707 stars 29 forks source link

Question on nested selectors #11

Closed apalm closed 8 years ago

apalm commented 8 years ago

First of all, thank you for a very cool library!

I noticed that using classes as described in https://github.com/blakeembrey/free-style#nested-selectors results in CSS like .nfe2c435d .myclass{ ... }, which of course only selects descendants of .nfe2c435d. Given the naming 'nested selectors', I assume this is intended behavior, but I wanted to double check. Thanks!

blakeembrey commented 8 years ago

Absolutely intended. It's turned out to be a very useful property to me (the warning there probably shouldn't be so heavy). For instance, I've occasionally used it for scoping button styles that are descendants, as you would normally in CSS.

apalm commented 8 years ago

Cool, thanks for the answer!