-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propose a file structure #55
Comments
I use something similar, except I don't have helpers, and my variables, mixins, and base are really minimal. Ah, and I have a (also pretty minimal) reset stylesheet, but I guess that belongs to base in your list. In my project the main SCSS is
|
awesome, that looks eerily similar to what we do. sometimes we flatten mixins + vars too for smaller sites. |
I personally hate having:
Seems so redundant, and annoying to navigate in the file tree. Not to mention that you store 3 files for the same component in completely different places in your directory structure. So what I do is just merge those into one root folder:
The con of this is that names of editor tabs (sublime text) are than all ending in Other than that, I still use almost exactly the same dir structure as proposed in the OP:
But I don't really like it. I'd prefer something that would eliminate the need for Was thinking of just flattening it to the top, as I can't think of folder name that would collide between |
I like that proposal. I use a similar folder structure but I hate the names trumps and settings. Yours make a lot more sense if you look at the names and think about a usual site structure. |
I like that recommendation. I've been using the exact same folders myself, prefer them to the ITCSS naming. |
sometimes, at the very end after |
RSCSS has conventions on how to name your classes and so on, but doesn't really tell you how to organize your files in any way except "one component per file".
In my projects with RSCSS, it's often used with something like ITCSS (inverted triangle CSS), where we have:
Where:
variables
- yep ($sans: 'source sans pro', sans-serif;
$blue: #adf;
)mixins
- yepbase
- things that style bare tags (eg,h1 { font-size: 2.5em }
)components
- actual components (eg,.photo-card { ... }
)*
helpers
- helper classes (eg,._nomargin { margin: 0 !important; }
)(
*
Thecomponents
tree usually gets split up per feature, eg,articles/
profiles/
and so on.)This all mirrors ITCSS conventions, just with names that I believe are more friendly. (settings → variables, generic → base, trumps → helpers)
I think this should start being an official recommendation of RSCSS. anyone with any thoughts?
The text was updated successfully, but these errors were encountered: