cultureamp/elm-css-modules-loader

Question, can use nested classes

aaahrens opened this issue ยท 1 comments

Hi,

Just curious if the loader can handle nested classes like
Btw this loader is amazing, using it with stylus right now and create elm app and never had to eject ๐Ÿ’ƒ

.one
   .two

This is more of a question about CSS modules than about this loader specifically. The short answer is yes: a CSS module that contains a selector with two class names (even something as complex as div.one > ul + .two) will export both of those class names (one and two), and elm-css-modules will let you use those in your Elm views. elm-css-modules-loader doesn't have to do anything special to support this, because it doesn't know anything about the selectors contained in the CSS code โ€“ it only sees the list of class names exported from the CSS module.