: Does putting everything in one SASS file violate the style guides? I'm not a fan of having a lot of files in my project. I use vim and it's a lot easier to have all my stuff in one place
I'm not a fan of having a lot of files in my project. I use vim and it's a lot easier to have all my stuff in one place rather than jumping between files.
However as I understand, it is preferred to separate things in SASS: variables, mixins, functions, forms, etc.
Should I do that as well, or is it "okay" to continue using one big file. I'm asking because I don't want to confuse developers/designers working on my stuff in the future.
More posts by @Smith883
1 Comments
Sorted by latest first Latest Oldest Best
Does putting everything in one SASS file violate the style guides?
I'm going to assume that, by style guide, you mean "best practices"? (Let me know if this is an incorrect assumption).
Whether or not stylesheets should be in single file or not is more a matter of opinion and from a technical perspective there wouldn't be a "violation".
I would say that If a project is small a single stylesheet file would generally be considered to be ok, but once the project gets bigger, then My experience is that most developers tend to separate blocks of SASS/LESS/CSS etc into separate files.
The bigger the project the more files.
Personally I use vim everyday and I still prefer to split My LESS stylesheets out into multiple files and use vims tab function to switch between files
:tabnew - create new tab
ctrl + <pg or pg> - to cycle between tabs
As, Im sure you know.
Also, if you want to know what other developers preference's are, I would take a look "out in the wild" at open source projects.
(You would want to see pre-compiled stylesheets as obviously production websites will typically deploy CSS in a different state to when in development).
As an example here are stylesheets of a couple of projects purely picked at random, one has many stylesheets (fancy design) the other actually has many stylesheets they just happen to be scattered about the project.
Simple Invoices - PHP invoicing app
Coderwall website github project
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.