rstacruz / rscss

Reasonable System for CSS Stylesheet Structure
https://ricostacruz.com/rscss
3.91k stars 176 forks source link

About FIle Structure #54

Open malmzz opened 8 years ago

malmzz commented 8 years ago

I have some concerns about the recommended file structure for big projects. Im starting one now and Im trying to use RSCSS but i`m struggling with the file structure. The guidelines talk about making one file per component. While this makes sense for me for small/medium projects, sounds like a nightmare for big web applications. Is there any other recommendations, like putting layouts in another folder? combining some components in the same file? Or any other thing that could help

mik01aj commented 8 years ago

I use RSCSS with React components, and I keep each component in a separate folder. The structure is roughly like:

ui/
   Button/
       index.jsx // react component
       style.scss // rscss component
       // other stuff, like docs, tests, mocks, images, etc.
   OtherComponent/
       index.jsx
       style.scss
pages/
   HomePage/
       index.jsx
       style.scss
styles/ // these are global styles
   _reset.scss // html reset
   _definitions.scss // global color/font definitions
   application.scss // big list of includes. This is what I compile to CSS