4

While this is probably a very silly question, is there a canonical way to use css modules in either Reagent or Om components? By this I mean CSS written in a separate file in SCSS or CSS without writing styling in EDN like garden.

Ethan McCue
  • 883
  • 1
  • 8
  • 17
  • Nothing special - just put your CSS/SCSS files under the resources folder in your project and then just link to your HTML as usual. Exception is when using 'bundled' solutions, like bootstrap, where everything is bundled together and included as a project dependency – Tim X Dec 17 '16 at 21:36
  • 3
    That works out of the box with most Lein templates; but my main concern is the modules bit. Namely, the CSS/SCSS in my resources folder applies globally to the entire site. If I want to write a component, I would have to coordinate class names between my CSS stored in resources and the components of my site. This might be better suited for a new question, but Is there a way to namespace CSS to apply to just one component? – Ethan McCue Dec 18 '16 at 05:53

0 Answers0